This commit is contained in:
Adrien PONSIN 2025-04-16 13:22:39 +02:00
parent 7c99754d5a
commit 32306467ea
No known key found for this signature in database
GPG Key ID: 7B4D4A32C05C475E

View File

@ -165,12 +165,9 @@ func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
for containerName, mr = range containerMethodRegex { for containerName, mr = range containerMethodRegex {
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)
log.Err(err).Send() log.Err(err).Send()
// return
} }
for _, resolvedIP := range resolvedIPs { for _, resolvedIP := range resolvedIPs {
log.Debug().Msgf("resolvedIP: %s -- IP: %s", resolvedIP.String(), ip.String())
if resolvedIP.Equal(ip) { if resolvedIP.Equal(ip) {
if err = checkMethodPath(r, mr); err != nil { if err = checkMethodPath(r, mr); err != nil {
handleError(w, err) handleError(w, err)