Skip to content

Commit

Permalink
Remove the host header before forwarding
Browse files Browse the repository at this point in the history
With some hosts behind shared TLS (using SNI), keeping the Host header
was causing the target host to be misidentified.

I also observed issues related to TLS verification (as seen in probot#156).

Fixes probot#156
  • Loading branch information
kahowell committed Oct 18, 2022
1 parent 758a13e commit 5093aec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class Client {

delete data.query

// Remove the host header, leaving it causes issues with SNI and TLS verification
delete data.host

const req = superagent.post(url.format(target)).send(data.body)

delete data.body
Expand Down

0 comments on commit 5093aec

Please sign in to comment.