add an error log for unauthorized container

This commit is contained in:
Adrien PONSIN 2025-04-17 17:15:58 +02:00
parent 3937b7cda5
commit 7bc9fa242e
No known key found for this signature in database
GPG Key ID: 7B4D4A32C05C475E

View File

@ -178,14 +178,9 @@ func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} }
} }
logDeniedRequest(r, http.StatusUnauthorized, "this container is not on the list of authorized ones")
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return return
/*
if !authorized {
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return
}
*/
} }
func logDeniedRequest(r *http.Request, statusCode int, message string) { func logDeniedRequest(r *http.Request, statusCode int, message string) {