Ver Fonte

fix(data source proxy): clear proxies request from cookies, fixes #2470

Torkel Ödegaard há 10 anos atrás
pai
commit
19f64bc561
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      pkg/api/dataproxy.go

+ 4 - 0
pkg/api/dataproxy.go

@@ -53,6 +53,10 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string) *httputil.ReverseProxy
 		if ds.BasicAuth {
 			req.Header.Add("Authorization", util.GetBasicAuthHeader(ds.BasicAuthUser, ds.BasicAuthPassword))
 		}
+
+		// clear cookie headers
+		req.Header.Del("Cookie")
+		req.Header.Del("Set-Cookie")
 	}
 
 	return &httputil.ReverseProxy{Director: director}