Revert "lib/anubis: support setting extended cookie flags (#120)" (#134)

This reverts commit e7cbd349f3.
This commit is contained in:
Xe Iaso 2025-03-26 20:50:54 -04:00 committed by GitHub
parent e7cbd349f3
commit ecc6b47f90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 53 additions and 144 deletions

View file

@ -3,17 +3,17 @@ package lib
import (
"net/http"
"time"
"github.com/TecharoHQ/anubis"
)
func (s *Server) ClearCookie(w http.ResponseWriter) {
func ClearCookie(w http.ResponseWriter) {
http.SetCookie(w, &http.Cookie{
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,
Name: anubis.CookieName,
Value: "",
Expires: time.Now().Add(-1 * time.Hour),
MaxAge: -1,
SameSite: http.SameSiteLaxMode,
})
}