From 7d4be0dcecdbe8deca8d055c0e2f10a369dc86e6 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Thu, 27 Mar 2025 15:24:03 -0400 Subject: 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 --- lib/http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/http.go') 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, }) } -- cgit v1.2.3