From 6184521e56aca759a3e05d00b3ae2374b0b72350 Mon Sep 17 00:00:00 2001 From: Mark Laing Date: Wed, 4 Jun 2025 10:16:46 +0100 Subject: [PATCH] pkg/http: Add `secureCookieFunc` field to CookieHandler. Signed-off-by: Mark Laing --- pkg/http/cookie.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/http/cookie.go b/pkg/http/cookie.go index 1ebc9e2..922aec0 100644 --- a/pkg/http/cookie.go +++ b/pkg/http/cookie.go @@ -8,12 +8,13 @@ import ( ) type CookieHandler struct { - securecookie *securecookie.SecureCookie - secureOnly bool - sameSite http.SameSite - maxAge int - domain string - path string + securecookie *securecookie.SecureCookie + secureCookieFunc func(r *http.Request) (*securecookie.SecureCookie, error) + secureOnly bool + sameSite http.SameSite + maxAge int + domain string + path string } func NewCookieHandler(hashKey, encryptKey []byte, opts ...CookieHandlerOpt) *CookieHandler {