Support setting sticky cookie max age

This commit is contained in:
白泽 2024-01-18 16:30:06 +08:00 committed by GitHub
parent 64ff214ff8
commit 0eeb85d01d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 187 additions and 0 deletions

View file

@ -155,6 +155,10 @@ type Cookie struct {
// SameSite defines the same site policy.
// More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
SameSite string `json:"sameSite,omitempty" toml:"sameSite,omitempty" yaml:"sameSite,omitempty" export:"true"`
// MaxAge indicates the number of seconds until the cookie expires.
// When set to a negative number, the cookie expires immediately.
// When set to zero, the cookie never expires.
MaxAge int `json:"maxAge,omitempty" toml:"maxAge,omitempty" yaml:"maxAge,omitempty" export:"true"`
}
// +k8s:deepcopy-gen=true