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>
This commit is contained in:
parent
d1d63d9c18
commit
7d4be0dcec
9 changed files with 168 additions and 56 deletions
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue