diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-03-27 15:24:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-27 15:24:03 -0400 |
| commit | 7d4be0dcecdbe8deca8d055c0e2f10a369dc86e6 (patch) | |
| tree | e5cd61b82bfe97c9cae132d9104763ab3be4d237 /lib/http.go | |
| parent | d1d63d9c1878b4567fec6a1d2bb86364de2b513e (diff) | |
| download | anubis-7d4be0dcecdbe8deca8d055c0e2f10a369dc86e6.tar.xz anubis-7d4be0dcecdbe8deca8d055c0e2f10a369dc86e6.zip | |
Apply bits of the cookie settings PR one by one (#140)
Enables uses to change the cookie domain and partitioned flags.
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib/http.go')
| -rw-r--r-- | lib/http.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http.go b/lib/http.go index 1284523..2f32b6d 100644 --- a/lib/http.go +++ b/lib/http.go @@ -7,13 +7,14 @@ import ( "github.com/TecharoHQ/anubis" ) -func ClearCookie(w http.ResponseWriter) { +func (s *Server) ClearCookie(w http.ResponseWriter) { http.SetCookie(w, &http.Cookie{ Name: anubis.CookieName, Value: "", Expires: time.Now().Add(-1 * time.Hour), MaxAge: -1, SameSite: http.SameSiteLaxMode, + Domain: s.opts.CookieDomain, }) } |
