Skip to content

[fetch-proxy] TLS/SSL issues due to host header not being updated #10769

@itxch

Description

@itxch

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:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions