Set SameSite cookie attribute to Strict
This commit is contained in:
parent
514f518d2a
commit
5ac55518ab
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ func New(name, value string, isHTTPS bool, path string) *http.Cookie {
|
|||
Secure: isHTTPS,
|
||||
HttpOnly: true,
|
||||
Expires: time.Now().Add(cookieDuration * 24 * time.Hour),
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ func Expired(name string, isHTTPS bool, path string) *http.Cookie {
|
|||
HttpOnly: true,
|
||||
MaxAge: -1,
|
||||
Expires: time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue