Defining a different path per Upstream when using the route-by-header plugin

Hello!
I am using the route by header plugin to route requests to different upstreams. However, I wanted to see how I would address a scenario where the path could change depending on what upstream I hit. For example, I have upstream hello.host.com configured when I see header value “hello” equals “world” and default.host.com in all other cases. The path that is used when calling the default case (hitting default.host.com) is /default. However, with the new case on the non-default upstream (hello.host.com), I want the path to be /hello. It’s the same service call being made, but to a different path on the server. How do I go about configuring Kong to support this behavior. Let’s also assume that I do not have the ability to change the paths on either service, so I am looking for Kong to assist me in defining the right paths depending on what upstream is being referenced.

Thank you for all of your help!
Jose


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ