Overwrite request host with internal host to prevent request rejection (#419)
This commit is contained in:
committed by
Soam Vasani
parent
49169e672d
commit
43fea01bd9
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user