From b6899e0c101742009724f050e47ab129792dc60b Mon Sep 17 00:00:00 2001 From: alteredCoder Date: Wed, 22 Nov 2023 16:25:20 +0100 Subject: [PATCH] add more debug when unauthorized --- pkg/acquisition/modules/waap/waap.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/acquisition/modules/waap/waap.go b/pkg/acquisition/modules/waap/waap.go index 5e0174cea..de9e8f29f 100644 --- a/pkg/acquisition/modules/waap/waap.go +++ b/pkg/acquisition/modules/waap/waap.go @@ -331,6 +331,9 @@ func (w *WaapSource) waapHandler(rw http.ResponseWriter, r *http.Request) { if !exists || time.Now().After(expiration) { if !w.IsAuth(apiKey) { rw.WriteHeader(http.StatusUnauthorized) + clientIP := r.Header.Get(waf.IPHeaderName) + remoteIP := r.RemoteAddr + w.logger.Errorf("Unauthorized request from '%s' (real IP = %s)", remoteIP, clientIP) return }