Add annotation for setting sticky cookie domain (#9088)
This adds the new annotation `nginx.ingress.kubernetes.io/session-cookie-domain` for setting the cookie `Domain` attribute of the sticky cookie. Signed-off-by: Matthias Neugebauer <mtneug@mailbox.org> Signed-off-by: Matthias Neugebauer <mtneug@mailbox.org>
This commit is contained in:
parent
077c0414aa
commit
26fe69cb47
9 changed files with 74 additions and 1 deletions
|
|
@ -159,6 +159,7 @@ type CookieSessionAffinity struct {
|
|||
Locations map[string][]string `json:"locations,omitempty"`
|
||||
Secure bool `json:"secure,omitempty"`
|
||||
Path string `json:"path,omitempty"`
|
||||
Domain string `json:"domain,omitempty"`
|
||||
SameSite string `json:"samesite,omitempty"`
|
||||
ConditionalSameSiteNone bool `json:"conditional_samesite_none,omitempty"`
|
||||
ChangeOnFailure bool `json:"change_on_failure,omitempty"`
|
||||
|
|
|
|||
|
|
@ -173,6 +173,9 @@ func (csa1 *CookieSessionAffinity) Equal(csa2 *CookieSessionAffinity) bool {
|
|||
if csa1.Path != csa2.Path {
|
||||
return false
|
||||
}
|
||||
if csa1.Domain != csa2.Domain {
|
||||
return false
|
||||
}
|
||||
if csa1.Expires != csa2.Expires {
|
||||
return false
|
||||
}
|
||||
|
|
@ -192,7 +195,7 @@ func (csa1 *CookieSessionAffinity) Equal(csa2 *CookieSessionAffinity) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
//Equal checks the equality between UpstreamByConfig types
|
||||
// Equal checks the equality between UpstreamByConfig types
|
||||
func (u1 *UpstreamHashByConfig) Equal(u2 *UpstreamHashByConfig) bool {
|
||||
if u1 == u2 {
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue