From 25ee73d8d6a474f721168bde198c466f2d5eaac1 Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 10 May 2021 03:50:00 -0500 Subject: [PATCH] set X-Forwarded-Host to orid host, drop X-Origin-Host #67 --- app/proxy/proxy.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/proxy/proxy.go b/app/proxy/proxy.go index 93356ad..e9f101a 100644 --- a/app/proxy/proxy.go +++ b/app/proxy/proxy.go @@ -171,8 +171,7 @@ func (h *Http) proxyHandler() http.HandlerFunc { Director: func(r *http.Request) { ctx := r.Context() uu := ctx.Value(contextKey("url")).(*url.URL) - r.Header.Add("X-Forwarded-Host", uu.Host) - r.Header.Set("X-Origin-Host", r.Host) + r.Header.Add("X-Forwarded-Host", r.Host) r.URL.Path = uu.Path r.URL.Host = uu.Host r.URL.Scheme = uu.Scheme