From 5093aec69ebe9fd186150aa719583094a95713c2 Mon Sep 17 00:00:00 2001 From: Kevin Howell Date: Wed, 3 Mar 2021 21:20:12 -0500 Subject: [PATCH] Remove the host header before forwarding 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 #156). Fixes #156 --- index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.ts b/index.ts index 27d1b1c1..2da510ad 100644 --- a/index.ts +++ b/index.ts @@ -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