fix:(middlewares.go) - Set Cookie SameSite mode to Strict - 1776 (#1777)

* None is deprecated and will fallback to Lax in the future.
* Using Strict is future proof and provides additional CSR protection

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
This commit is contained in:
Manuel
2022-09-27 23:58:47 +02:00
committed by GitHub
parent 751e42c705
commit 72cde6dfde
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func clientUniqueIdAdder(next http.Handler) http.Handler {
MaxAge: consts.CookieExpiry,
HttpOnly: true,
Secure: true,
SameSite: http.SameSiteNoneMode,
SameSite: http.SameSiteStrictMode,
Path: "/",
}
http.SetCookie(w, c)
+1
View File
@@ -161,6 +161,7 @@ func getPlayer(players core.Players) func(next http.Handler) http.Handler {
Value: player.ID,
MaxAge: consts.CookieExpiry,
HttpOnly: true,
SameSite: http.SameSiteStrictMode,
Path: "/",
}
http.SetCookie(w, cookie)