pkg/http: Add secureCookieFunc field to CookieHandler.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
This commit is contained in:
Mark Laing 2025-06-04 10:16:46 +01:00
parent 7d57aaa999
commit 6184521e56
No known key found for this signature in database
GPG key ID: D9277AD9F18400E0

View file

@ -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 {