Skip to content

Conversation

@maddie927
Copy link

Not sure if this is how you'd want to implement it, but the basic idea is there.

@jergason
Copy link
Contributor

I'm confused by this.

@maddie927
Copy link
Author

Since this proxy is forwarding at the HTTP level and not the TCP level, it actually involves two separate connections: one to the proxy and one to the proxied destination. According to HTTP, the request from the proxy to the proxied destination should use the destination as the Host header.

  1. A lot of other proxies like nginx will use that header to internally direct traffic
  2. The destination might not recognize the Host header if it isn't rewritten and deny the request
  3. SSL certs include the host name, so having that header match is core to the cert validation code

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

Successfully merging this pull request may close these issues.

3 participants