mirror of https://github.com/gofiber/fiber.git
fix(middleware/session): CookieSameSite default "Lax" (#1638)
* CookieSameSite default "Lax"
* Update README.md
* CookieSameSite default "Lax"
* Revert "CookieSameSite default "Lax""
This reverts commit 414187704b
.
pull/1644/head
parent
af6b204e50
commit
693f3c5118
|
@ -140,8 +140,8 @@ type Config struct {
|
|||
// Optional. Default value false.
|
||||
CookieHTTPOnly bool
|
||||
|
||||
// Indicates if CSRF cookie is HTTP only.
|
||||
// Optional. Default value false.
|
||||
// Sets the CSRF cookie SameSite attribute.
|
||||
// Optional. Default value "Lax".
|
||||
CookieSameSite string
|
||||
|
||||
// KeyGenerator generates the session key.
|
||||
|
|
|
@ -202,7 +202,6 @@ func (s *Session) setSession() {
|
|||
fcookie.SetSecure(s.config.CookieSecure)
|
||||
fcookie.SetHTTPOnly(s.config.CookieHTTPOnly)
|
||||
|
||||
// TODO Default value should be set to `strict` in fiber v3.
|
||||
switch utils.ToLower(s.config.CookieSameSite) {
|
||||
case "strict":
|
||||
fcookie.SetSameSite(fasthttp.CookieSameSiteStrictMode)
|
||||
|
|
Loading…
Reference in New Issue