1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-21 19:32:58 +00:00

🩹 Fix: Add csrf_ to default encrypt cookie exception (#1631) (#1698)

This commit is contained in:
amir 2022-01-10 01:21:49 +04:00 committed by GitHub
parent 48acc21117
commit 4f1a712498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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.
@ -94,4 +94,4 @@ type Config struct {
app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
}))
```
```

View File

@ -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,