Overwrite request host with internal host to prevent request rejection (#419)

This commit is contained in:
Ta-Ching Chen
2017-11-30 23:58:14 -08:00
committed by Soam Vasani
parent 49169e672d
commit 43fea01bd9
+5
View File
@@ -141,6 +141,11 @@ func (fh *functionHandler) handler(responseWriter http.ResponseWriter, request *
// function metadata here.
req.URL.Path = "/"
// Overwrite request host with internal host,
// or request will be blocked in some situations
// (e.g. istio-proxy)
req.Host = serviceUrl.Host
// leave the query string intact (req.URL.RawQuery)
if _, ok := req.Header["User-Agent"]; !ok {