fix(proxy): document global-agent TLS shim

This commit is contained in:
Jesse Merhi
2026-05-03 15:00:36 +10:00
committed by clawsweeper
parent fb5d44c607
commit e4bf211c48

View File

@@ -252,6 +252,10 @@ function withTlsTargetHost(configuration: unknown): unknown {
return configuration;
}
// Compatibility shim for https://github.com/gajus/global-agent/issues/83.
// global-agent@4.1.3 can CONNECT to the right host while leaving Node TLS
// certificate validation pointed at the proxy socket host. Keep this until
// upstream carries the CONNECT target host through to tls.connect().
const tlsOptions: Record<string, unknown> = {
...configuration.tls,
host: configuration.host,