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 Mar 4, 2021
1 parent 2c34dab commit 6584331
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 6584331

Please sign in to comment.