Skip to content

Commit

Permalink
🩹 Fix: Add csrf_ to default encrypt cookie exception (#1631) (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir9480 committed Jan 9, 2022
1 parent 48acc21 commit 4f1a712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions middleware/encryptcookie/README.md
Expand Up @@ -64,7 +64,7 @@ type Config struct {

// Array of cookie keys that should not be encrypted.
//
// Optional. Default: []
// Optional. Default: ["csrf_"]
Except []string

// Base64 encoded unique key to encode & decode cookies.
Expand Down Expand Up @@ -94,4 +94,4 @@ type Config struct {
app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
}))
```
```
2 changes: 1 addition & 1 deletion middleware/encryptcookie/config.go
Expand Up @@ -34,7 +34,7 @@ type Config struct {
// ConfigDefault is the default config
var ConfigDefault = Config{
Next: nil,
Except: make([]string, 0),
Except: []string{"csrf_"},
Key: "",
Encryptor: EncryptCookie,
Decryptor: DecryptCookie,
Expand Down

0 comments on commit 4f1a712

Please sign in to comment.