Przeglądaj źródła

Fixed req.Host in datasource proxy, Fixes #1478

Torkel Ödegaard 11 lat temu
rodzic
commit
1a44036148
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      pkg/api/dataproxy.go

+ 1 - 0
pkg/api/dataproxy.go

@@ -17,6 +17,7 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string) *httputil.ReverseProxy
 	director := func(req *http.Request) {
 	director := func(req *http.Request) {
 		req.URL.Scheme = target.Scheme
 		req.URL.Scheme = target.Scheme
 		req.URL.Host = target.Host
 		req.URL.Host = target.Host
+		req.Host = target.Host
 
 
 		reqQueryVals := req.URL.Query()
 		reqQueryVals := req.URL.Query()