return a 401 if the container is not authorized

This commit is contained in:
Adrien PONSIN 2025-04-17 14:07:19 +02:00
parent 90d442b611
commit 8adf4be96e
No known key found for this signature in database
GPG Key ID: 7B4D4A32C05C475E

View File

@ -241,6 +241,14 @@ func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} }
} }
log.Error().
Str("remote_addr", r.RemoteAddr).
Str("method", r.Method).
Str("path", r.URL.Path).
Str("decision", "denied").
Msg("this container is not on the list of authorized ones")
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return
/* /*
log.Warn(). log.Warn().
Str("remote_addr", r.RemoteAddr). Str("remote_addr", r.RemoteAddr).