Configurable path for sticky cookies
This commit is contained in:
parent
552bd8f180
commit
ec00c4aa42
28 changed files with 530 additions and 26 deletions
|
@ -113,6 +113,7 @@ func Test_parseServiceConfig(t *testing.T) {
|
|||
"traefik.ingress.kubernetes.io/service.sticky.cookie.name": "foobar",
|
||||
"traefik.ingress.kubernetes.io/service.sticky.cookie.secure": "true",
|
||||
"traefik.ingress.kubernetes.io/service.sticky.cookie.samesite": "none",
|
||||
"traefik.ingress.kubernetes.io/service.sticky.cookie.path": "foobar",
|
||||
},
|
||||
expected: &ServiceConfig{
|
||||
Service: &ServiceIng{
|
||||
|
@ -122,6 +123,7 @@ func Test_parseServiceConfig(t *testing.T) {
|
|||
Secure: true,
|
||||
HTTPOnly: true,
|
||||
SameSite: "none",
|
||||
Path: String("foobar"),
|
||||
},
|
||||
},
|
||||
ServersScheme: "protocol",
|
||||
|
@ -138,7 +140,11 @@ func Test_parseServiceConfig(t *testing.T) {
|
|||
},
|
||||
expected: &ServiceConfig{
|
||||
Service: &ServiceIng{
|
||||
Sticky: &dynamic.Sticky{Cookie: &dynamic.Cookie{}},
|
||||
Sticky: &dynamic.Sticky{
|
||||
Cookie: &dynamic.Cookie{
|
||||
Path: String("/"),
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue