diff --git a/src/github.com/getlantern/flashlight/client/reverseproxy.go b/src/github.com/getlantern/flashlight/client/reverseproxy.go index 932db39980..633811914e 100644 --- a/src/github.com/getlantern/flashlight/client/reverseproxy.go +++ b/src/github.com/getlantern/flashlight/client/reverseproxy.go @@ -35,6 +35,9 @@ func (client *Client) newReverseProxy(bal *balancer.Balancer) *httputil.ReverseP // field when upstream servers are trying to determine the client IP. // We need to add also the X-Lantern-Device-Id field. Director: func(req *http.Request) { + // Add back the Host header which was stripped by the ReverseProxy. This + // is needed for sites that do virtual hosting. + req.Header.Set("Host", req.Host) req.Header.Set("X-LANTERN-DEVICE-ID", client.cfg().DeviceID) for _, authToken := range allAuthTokens { req.Header.Add("X-LANTERN-AUTH-TOKEN", authToken)