mirror of https://github.com/docker/docs.git
commit
a403a99c1c
|
|
@ -45,14 +45,12 @@ func proxy(tlsConfig *tls.Config, container *cluster.Container, w http.ResponseW
|
||||||
// RequestURI may not be sent to client
|
// RequestURI may not be sent to client
|
||||||
r.RequestURI = ""
|
r.RequestURI = ""
|
||||||
|
|
||||||
parts := strings.SplitN(container.Node.Addr, "://", 2)
|
if tlsConfig != nil {
|
||||||
if len(parts) == 2 {
|
r.URL.Scheme = "https"
|
||||||
r.URL.Scheme = parts[0]
|
|
||||||
r.URL.Host = parts[1]
|
|
||||||
} else {
|
} else {
|
||||||
r.URL.Scheme = "http"
|
r.URL.Scheme = "http"
|
||||||
r.URL.Host = parts[0]
|
|
||||||
}
|
}
|
||||||
|
r.URL.Host = container.Node.Addr
|
||||||
|
|
||||||
log.Debugf("[PROXY] --> %s %s", r.Method, r.URL)
|
log.Debugf("[PROXY] --> %s %s", r.Method, r.URL)
|
||||||
resp, err := client.Do(r)
|
resp, err := client.Do(r)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue