-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
When proxying requests the Host header in the proxied Request isn't updated, this causes TLS issues due to host name not matching the certificate on the downstream server.
The fix would be very simple, we could simple add
proxyHeaders.set("Host", proxyUrl.host);On line 61 here:
remix/packages/fetch-proxy/src/lib/fetch-proxy.ts
Lines 60 to 65 in 8b557a4
| let proxyHeaders = new Headers(request.headers) | |
| if (xForwardedHeaders) { | |
| proxyHeaders.append('X-Forwarded-Proto', url.protocol.replace(/:$/, '')) | |
| proxyHeaders.append('X-Forwarded-Host', url.host) | |
| } | |
If the team is open to this change I can raise a PR