X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a93ef946eb1e73ee190ea4ff19c4f9278235530c..ac2cc876733c6137d525d12780275f2c02d84383:/lib/controller/proxy.go diff --git a/lib/controller/proxy.go b/lib/controller/proxy.go index 1ff383d896..712071bef9 100644 --- a/lib/controller/proxy.go +++ b/lib/controller/proxy.go @@ -46,6 +46,9 @@ func (p *proxy) Do(w http.ResponseWriter, reqIn *http.Request, urlOut *url.URL, xff = xffIn + "," + xff } hdrOut.Set("X-Forwarded-For", xff) + if hdrOut.Get("X-Forwarded-Proto") == "" { + hdrOut.Set("X-Forwarded-Proto", reqIn.URL.Scheme) + } hdrOut.Add("Via", reqIn.Proto+" arvados-controller") ctx := reqIn.Context() @@ -58,6 +61,7 @@ func (p *proxy) Do(w http.ResponseWriter, reqIn *http.Request, urlOut *url.URL, reqOut := (&http.Request{ Method: reqIn.Method, URL: urlOut, + Host: reqIn.Host, Header: hdrOut, Body: reqIn.Body, }).WithContext(ctx)