summaryrefslogtreecommitdiff
path: root/pkg/web/cookie.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-09 11:47:13 -0600
committermo khan <mo@mokhan.ca>2025-05-09 11:47:13 -0600
commit05ca9b8d3a9c7203a3a3b590beaa400900bd9007 (patch)
tree9e4492095f7cd1bdae0f5f2e43399976608a74fe /pkg/web/cookie.go
parentc164c0172c18a76ebd3dbded32e26fe624806dd8 (diff)
refactor: delegate to WriteCookie to validate cookie
Diffstat (limited to 'pkg/web/cookie.go')
-rw-r--r--pkg/web/cookie.go6
1 files 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 {