-
Notifications
You must be signed in to change notification settings - Fork 56
Ability to map by host pattern instead of just path #121
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
Comments
Why do you need such feature? |
I'm using Bloomreach CMS which uses 2 different applications that need to be deployed on an application server. These applications need to be deployed under specific context paths (/site and /cms respectively). Of course no one wants to deploy their site at /site, so you need to reverse proxy this. However, Bloomreach went all their way to make it impossible to efficiently host this stuff. So after you made the site available at contoso.com/ , contoso.com/cms still won't work fully. Instead, you need to bind it under cms.contoso.com and have a reverse proxy for that as well. Because of all the reverse proxy hell required to get Bloomreach too work (goes much beyond the standard capabilities of a load balancer like AWS EC2's one), I've decided to just deploy one extra WAR into the container with the reverse proxies for both the site and CMS. For this I need to be able to use different proxy configurations for different requested hostnames. |
Ok. Will you manually set the Host HTTP header in HTTP client when sending request to server that uses Charon? |
To be more clear. What I see is:
Now, if you want the charon app to receive requests with Host header different than its IP/domain, you must set the header manually. |
The client connects through a browser, which specifies the requested host as part of the Request URL. So both cms.contoso.com and contoso.com resolve to the proxy IP running the Charon app. Based on the requested host (set by the browser in the request URL), the proxy forwards the request to the appropiate URL. |
Ok, I see the point now. |
Use case: reverse proxy differently for various requested hosts.
Example syntax:
The text was updated successfully, but these errors were encountered: