pkg/http: Add secureCookieFunc
field to CookieHandler.
Signed-off-by: Mark Laing <mark.laing@canonical.com>
This commit is contained in:
parent
7d57aaa999
commit
6184521e56
1 changed files with 7 additions and 6 deletions
|
@ -8,12 +8,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type CookieHandler struct {
|
type CookieHandler struct {
|
||||||
securecookie *securecookie.SecureCookie
|
securecookie *securecookie.SecureCookie
|
||||||
secureOnly bool
|
secureCookieFunc func(r *http.Request) (*securecookie.SecureCookie, error)
|
||||||
sameSite http.SameSite
|
secureOnly bool
|
||||||
maxAge int
|
sameSite http.SameSite
|
||||||
domain string
|
maxAge int
|
||||||
path string
|
domain string
|
||||||
|
path string
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCookieHandler(hashKey, encryptKey []byte, opts ...CookieHandlerOpt) *CookieHandler {
|
func NewCookieHandler(hashKey, encryptKey []byte, opts ...CookieHandlerOpt) *CookieHandler {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue