From a5f67091bf90f249596d90c85cfc4b1f75135c93 Mon Sep 17 00:00:00 2001 From: Cameron Steel Date: Tue, 25 Feb 2020 04:08:14 +1100 Subject: [PATCH] Tweak HTTP host header. Fixes #107 (#168) --- tunneldns/https_upstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tunneldns/https_upstream.go b/tunneldns/https_upstream.go index ac9b60ec..57f51deb 100644 --- a/tunneldns/https_upstream.go +++ b/tunneldns/https_upstream.go @@ -83,7 +83,7 @@ func (u *UpstreamHTTPS) exchangeWireformat(msg []byte) ([]byte, error) { } req.Header.Add("Content-Type", "application/dns-message") - req.Host = u.endpoint.Hostname() + req.Host = u.endpoint.Host resp, err := u.client.Do(req) if err != nil {