From 7bc9fa242e7d44a2a272aa65a9b534f3672011c1 Mon Sep 17 00:00:00 2001 From: Adrien PONSIN Date: Thu, 17 Apr 2025 17:15:58 +0200 Subject: [PATCH] add an error log for unauthorized container --- command/serve.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/command/serve.go b/command/serve.go index 9846e38..f84fce3 100644 --- a/command/serve.go +++ b/command/serve.go @@ -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) return - /* - if !authorized { - http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) - return - } - */ } func logDeniedRequest(r *http.Request, statusCode int, message string) {