support set routes config match cookie value ? #1582
-
Can i set routes config match cookie value , like traefik HeadersRegexp("Cookie",'ap-ver=1.0') ? eg : cookie ap-ver=1.0 go to 192.168.1.1 , and cookie ap-ver=2.0 go to 192.168.1.2 |
Beta Was this translation helpful? Give feedback.
Answered by
greenEkatherine
Feb 21, 2022
Replies: 1 comment 2 replies
-
Yes, what you need is header routing based on "ClusterId": "cluster1",
"Match": {
"Path": "{**catch-all}",
"Headers": [
{
"Name": "Cookie",
"Values": [ "ap-ver=1.0" ],
"Mode": "HeaderPrefix"
}
]
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
karelz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, what you need is header routing based on
HeaderPrefix
orContains
modes https://microsoft.github.io/reverse-proxy/articles/header-routing.html#configuration: