summaryrefslogtreecommitdiff
path: root/internal/handlers/proxy.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/proxy.go')
-rw-r--r--internal/handlers/proxy.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/handlers/proxy.go b/internal/handlers/proxy.go
index ce10a6a..ce328ef 100644
--- a/internal/handlers/proxy.go
+++ b/internal/handlers/proxy.go
@@ -31,6 +31,7 @@ func NewServiceProxy(targetURL, allowedOrigin, pathPrefix string) http.Handler {
Director: func(req *http.Request) {
req.URL.Scheme = target.Scheme
req.URL.Host = target.Host
+ req.Host = target.Host // use upstream host so loopback services see a loopback Host header
req.URL.Path = stripPrefix(req.URL.Path)
if req.URL.RawPath != "" {
req.URL.RawPath = stripPrefix(req.URL.RawPath)