1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-13 17:42:53 +08:00

Add some logging to the proxy

This commit is contained in:
Jonathan Leibiusky @xetorthio 2017-03-13 18:23:36 -03:00
parent a4b0a98df3
commit 0770eb689b

View File

@ -3,6 +3,7 @@ package handlers
import (
"crypto/tls"
"fmt"
"log"
"net"
"net/http"
"net/http/httputil"
@ -67,6 +68,7 @@ func NewMultipleHostReverseProxy() *httputil.ReverseProxy {
}
req.URL.Host = fmt.Sprintf("%s:%s", node, port)
log.Printf("HTTP Reverse proxying to %s\n", req.URL.Host)
}
return &httputil.ReverseProxy{Director: director, Transport: transport}
@ -91,6 +93,7 @@ func NewSSLDaemonHandler() *httputil.ReverseProxy {
req.URL.Scheme = "http"
req.URL.Host = fmt.Sprintf("%s:%s", node, "2375")
log.Printf("HTTPS Reverse proxying to %s\n", req.URL.Host)
}
return &httputil.ReverseProxy{Director: director}