From fb7dce9887adb94c24b6de0a8f46f1adac2e3d72 Mon Sep 17 00:00:00 2001 From: MohamadTahir Date: Mon, 30 Oct 2023 14:52:36 +0300 Subject: [PATCH] add simple logs --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 49f1bec..3666850 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net/http" + "os" "strings" ) @@ -53,6 +54,12 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h func (a *UsersBlocker) ServeHTTP(rw http.ResponseWriter, req *http.Request) { userId := req.Header["X-Auth-User-Id"][0] + os.Stdout.WriteString("request Path ->") + os.Stdout.WriteString(req.URL.Path) + + os.Stdout.WriteString("userId ->") + os.Stdout.WriteString(userId) + var isUserBlocked bool for _, id := range a.userId {