diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-03-26 20:50:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-26 20:50:58 -0400 |
| commit | 0b2e2c34df3fe5d741c0327acc62d44b69db83db (patch) | |
| tree | 63cfdb5045e26bd86f09d156e0d7588514e39c55 /lib/http.go | |
| parent | ecc6b47f90bd4ffc48d1555df8012d534fa5d180 (diff) | |
| download | anubis-revert-134-revert-120-Xe/cookie-settings.tar.xz anubis-revert-134-revert-120-Xe/cookie-settings.zip | |
Revert "Revert "lib/anubis: support setting extended cookie flags (#120)" (#134)"revert-134-revert-120-Xe/cookie-settings
This reverts commit ecc6b47f90bd4ffc48d1555df8012d534fa5d180.
Diffstat (limited to 'lib/http.go')
| -rw-r--r-- | lib/http.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/http.go b/lib/http.go index 1284523..d7f678f 100644 --- a/lib/http.go +++ b/lib/http.go @@ -3,17 +3,17 @@ package lib import ( "net/http" "time" - - "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, + Name: s.opts.CookieName, + Value: "", + Expires: time.Now().Add(-1 * time.Hour), + MaxAge: -1, + Domain: s.opts.CookieDomain, + Partitioned: s.opts.CookiePartitioned, + SameSite: http.SameSiteLaxMode, }) } |
