Fix proxied request-uri to be valid HTTP requests

This commit is contained in:
Jordan Liggitt
2017-09-06 21:51:46 -04:00
parent ea017719e5
commit 9648f1cb7a
5 changed files with 26 additions and 33 deletions

View File

@@ -66,7 +66,7 @@ func (r *ProxyREST) Connect(ctx genericapirequest.Context, id string, opts runti
if err != nil {
return nil, err
}
location.Path = path.Join(location.Path, proxyOpts.Path)
location.Path = path.Join("/", location.Path, proxyOpts.Path)
// Return a proxy handler that uses the desired transport, wrapped with additional proxy handling (to get URL rewriting, X-Forwarded-* headers, etc)
return newThrottledUpgradeAwareProxyHandler(location, transport, true, false, responder), nil
}