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

supporting target server with virtual hosting #8

Open
ant0ine opened this issue Mar 23, 2015 · 0 comments
Open

supporting target server with virtual hosting #8

ant0ine opened this issue Mar 23, 2015 · 0 comments

Comments

@ant0ine
Copy link

ant0ine commented Mar 23, 2015

Hi,

My target server is an HTTP 1.1 server that handles multiple hostnames.
I need to make Foxy set the Host header of the request to the hostname of the original request.

example:
My server listens on ip:127.0.0.1 port:9000 and serves two different sites on http://foo.dev:9000 and http://bar.dev:9000.
A proxy listening to ip:127.0.0.1 port:3000, and receiving a request with "foo.dev:3000" as a Host header should make an HTTP request to ip:127.0.0.1 port:9000 with as a Host header: "foo.dev:9000".

=> IMO, that would be more respectful of HTTP 1.1 than setting the target host in the Host header.

Is there a way I can fix that with the reqHeaders or middleware options ?

Thanks!

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

1 participant