Skip to content

Commit

Permalink
lib: fix Host header when CONNECT ProxyAgent
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Dec 28, 2023
1 parent 6a04edc commit 6abbcc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ProxyAgent extends DispatcherBase {
signal: opts.signal,
headers: {
...this[kProxyHeaders],
host
host: requestedHost,

Check failure on line 100 in lib/proxy-agent.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma

Check failure on line 100 in lib/proxy-agent.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma
}
})
if (statusCode !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion test/proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ test('ProxyAgent correctly sends headers when using fetch - #1355, #1623', async
}

const expectedProxyHeaders = {
host: `localhost:${proxy.address().port}`,
host: `localhost:${server.address().port}`,
connection: 'close'
}

Expand Down

0 comments on commit 6abbcc0

Please sign in to comment.