mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-17 04:22:23 +03:00
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:
parent
751e42c705
commit
72cde6dfde
server
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user