From cf8b4d56ccecbab9254ce469856123f364b21ab9 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Tue, 24 Aug 2021 08:49:57 +0200 Subject: [PATCH] fix: set path for cookies --- pkg/router/cookies.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/router/cookies.go b/pkg/router/cookies.go index 00c7256..53e21bf 100644 --- a/pkg/router/cookies.go +++ b/pkg/router/cookies.go @@ -73,6 +73,7 @@ func (h *Handler) setEncryptedCookie(w http.ResponseWriter, key string, plaintex Secure: h.SecureCookies, HttpOnly: true, SameSite: http.SameSiteLaxMode, + Path: "/", }) return nil @@ -102,5 +103,6 @@ func (h *Handler) deleteCookie(w http.ResponseWriter, key string) { Name: key, Secure: h.SecureCookies, SameSite: http.SameSiteLaxMode, + Path: "/", }) }