remove debug code

This commit is contained in:
ruokai.lai 2017-03-10 15:09:16 +11:00
parent c63035e970
commit cc3061fa0f

View File

@ -369,8 +369,6 @@ func listenHTTP(path, allowedHost string, ch chan error) {
fc := func(w http.ResponseWriter, r *http.Request) { fc := func(w http.ResponseWriter, r *http.Request) {
host, _, err := net.SplitHostPort(r.RemoteAddr) host, _, err := net.SplitHostPort(r.RemoteAddr)
allowedIPs, err1 := net.LookupIP(allowedHost) allowedIPs, err1 := net.LookupIP(allowedHost)
log.Printf("host: %s; ip: %s", host, allowedIPs[0])
fmt.Println(host,allowedIPs)
if err == nil && err1 == nil { if err == nil && err1 == nil {
allowedIPs = append(allowedIPs, net.ParseIP("172.17.0.1")) allowedIPs = append(allowedIPs, net.ParseIP("172.17.0.1"))
for _, a :=range allowedIPs { for _, a :=range allowedIPs {