Set cookies to have the Secure flag default to true (#739)

* Set Cookies to use the Secure Flag and default SameSite to None

* Add secure flag test

* Updated changelog and documentation for secure flag option
This commit is contained in:
Victor Fernandes 2025-06-30 14:58:31 -04:00 committed by GitHub
parent 12453fdc00
commit 292c470ada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 32 additions and 12 deletions

View file

@ -262,6 +262,7 @@ func TestCookieSettings(t *testing.T) {
CookieDomain: "127.0.0.1",
CookiePartitioned: true,
CookieSecure: true,
CookieExpiration: anubis.CookieDefaultExpirationTime,
})
@ -309,6 +310,10 @@ func TestCookieSettings(t *testing.T) {
if ckie.Partitioned != srv.opts.CookiePartitioned {
t.Errorf("wanted partitioned flag %v, got: %v", srv.opts.CookiePartitioned, ckie.Partitioned)
}
if ckie.Secure != srv.opts.CookieSecure {
t.Errorf("wanted secure flag %v, got: %v", srv.opts.CookieSecure, ckie.Secure)
}
}
func TestCheckDefaultDifficultyMatchesPolicy(t *testing.T) {