1 parent c30a9dc commit 3b4f14cCopy full SHA for 3b4f14c
1 file changed
src/agent.ts
@@ -109,15 +109,9 @@ export default class HttpsProxyAgent extends Agent {
109
).toString('base64')}`;
110
}
111
112
- // The `Host` header should only include the port
113
- // number when it is not the default port.
114
- let { host, port, secureEndpoint } = opts;
115
- if (!isDefaultPort(port, secureEndpoint)) {
116
- host += `:${port}`;
117
- }
118
- headers.Host = host;
119
-
+ headers.Host = hostname;
120
headers.Connection = 'close';
+
121
for (const name of Object.keys(headers)) {
122
payload += `${name}: ${headers[name]}\r\n`;
123
0 commit comments