still adding shitty debug logs
This commit is contained in:
parent
21a66d786f
commit
113faf0212
@ -151,7 +151,9 @@ func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
log.Debug().Str("remote_addr", r.RemoteAddr).Str("http_method", r.Method).Str("path", r.URL.Path).Msg("incoming request")
|
log.Debug().Str("remote_addr", r.RemoteAddr).Str("http_method", r.Method).Str("path", r.URL.Path).Msg("incoming request")
|
||||||
mr, ok := containerMethodRegex["*"]
|
mr, ok := containerMethodRegex["*"]
|
||||||
if ok {
|
if ok {
|
||||||
|
fmt.Println("here 1")
|
||||||
if err := checkMethodPath(w, r, mr); err != nil {
|
if err := checkMethodPath(w, r, mr); err != nil {
|
||||||
|
fmt.Println("failed here 1")
|
||||||
log.Err(err).Send()
|
log.Err(err).Send()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -165,20 +167,24 @@ func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
resolvedIPs, err := net.LookupIP(containerName)
|
resolvedIPs, err := net.LookupIP(containerName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
|
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
|
||||||
fmt.Println("failed here 1")
|
fmt.Println("failed here 2")
|
||||||
log.Err(err).Send()
|
log.Err(err).Send()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, resolvedIP := range resolvedIPs {
|
for _, resolvedIP := range resolvedIPs {
|
||||||
if resolvedIP.Equal(ip) {
|
if resolvedIP.Equal(ip) {
|
||||||
if err = checkMethodPath(w, r, mr); err != nil {
|
if err = checkMethodPath(w, r, mr); err != nil {
|
||||||
fmt.Println("failed here 2")
|
fmt.Println("failed here 3")
|
||||||
log.Err(err).Send()
|
log.Err(err).Send()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println("here 2")
|
||||||
}
|
}
|
||||||
|
fmt.Println("here 3")
|
||||||
}
|
}
|
||||||
|
fmt.Println("here 4")
|
||||||
}
|
}
|
||||||
|
fmt.Println("here 5")
|
||||||
}
|
}
|
||||||
ph.rp.ServeHTTP(w, r)
|
ph.rp.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user