We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a backend providing a route /pfx2/get_something, here mocked with the following config:
/pfx2/get_something
server "be" { hosts = ["*:8081"] api { base_path = "/pfx2" endpoint "/get_something" { response { json_body = ["foo", "bar"] } } } }
Now I want to proxy a request to this backend route while providing the endpoint with a different path prefix: /pfx1/get_something:
/pfx1/get_something
server "gw" { hosts = ["*:8080"] api { base_path = "/pfx1" endpoint "/get_something" { proxy { backend = "be" url = "/get_something" } } } } definitions { backend "be" { origin = "http://localhost:8081" path = "/pfx2/**" } }
Currently, there seems to be no way to do this without either
proxy { backend = "be" url = "/get_something" }
or
proxy { backend "be" { path = "/get_something" } }
I'd consider both solutions ugly.
Any ideas how to do it more elegantly?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given a backend providing a route
/pfx2/get_something
, here mocked with the following config:Now I want to proxy a request to this backend route while providing the endpoint with a different path prefix:
/pfx1/get_something
:Currently, there seems to be no way to do this without either
or
I'd consider both solutions ugly.
Any ideas how to do it more elegantly?
The text was updated successfully, but these errors were encountered: