From 05ca9b8d3a9c7203a3a3b590beaa400900bd9007 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 9 May 2025 11:47:13 -0600 Subject: refactor: delegate to WriteCookie to validate cookie --- pkg/web/cookie.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/web/cookie.go b/pkg/web/cookie.go index 15a2cad..0c39735 100644 --- a/pkg/web/cookie.go +++ b/pkg/web/cookie.go @@ -41,12 +41,12 @@ func withSignedValue(value string) x.Option[*http.Cookie] { )) } -func ExpireCookie(w http.ResponseWriter, name string) { - cookie.Expire(w, name, +func ExpireCookie(w http.ResponseWriter, name string) error { + return WriteCookie(w, cookie.Reset(name, cookie.WithPath("/"), cookie.WithHttpOnly(true), cookie.WithSecure(true), - ) + )) } func CookieValueFrom(c *http.Cookie) string { -- cgit v1.2.3