Skip to content
New issue

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

[feature]: proxy route option #356

Closed
BSick7 opened this issue Sep 19, 2017 · 3 comments
Closed

[feature]: proxy route option #356

BSick7 opened this issue Sep 19, 2017 · 3 comments
Milestone

Comments

@BSick7
Copy link

BSick7 commented Sep 19, 2017

I am willing to build this PR, but I want to make sure it will be accepted before I start the effort.

We currently have a private and public fabio with the intention of protecting private endpoints from the public. However, we want to be able to easily proxy a path on a public endpoint to the private fabio. For instance, this would allow us to proxy /api on a public facing UI container to an api container.

I believe that an additional option added to the routing language would solve this very elegantly with no side effects to the current fabio estate.

To illustrate, the UI service would have the following tags.

urlprefix-ui.domain.com/
urlprefix-ui.domain.com/api strip=/api proxy=http://api/
@lbrucher
Copy link

Similar need here.
Building a "maintenance mode" feature where I'd like to re-route traffic going to serviceA to another service (serviceB for instance).
Would have liked to simply add a manual route like this:
route add serviceA serviceA.domain.com/ http://serviceB.domain.com weight 1 opts "proxy=true"

The "proxy=true" would in fact rewrite the Host HTTP header to "serviceB" otherwise we'd endup with an infinite loop in Fabio once it receives a request for serviceA.

Alternatively we could also update serviceA's tags as suggested in the feature description.
In that case, "proxy = http://api/" should also rewrite the Host HTTP header accordingly.

Finally, the original Host header should also be kept, probably in a new HTTP header ("x-host-original"?)

@magiconair
Copy link
Contributor

There is the host=xxx option that you can set which sounds similar to what you are trying to do. host=dst will set it to the upstream hostname, e.g. google.com See #294

@magiconair magiconair added this to the Unplanned milestone Oct 10, 2017
@magiconair
Copy link
Contributor

I'm going to close this for now. Feel free to comment if the host=xxx option doesn't address your need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants