From 4643c9388d30f3dd849adc7d67f92e67a34fbf60 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Wed, 26 Apr 2023 12:29:36 -0600 Subject: [PATCH] Fixing header check --- middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.go b/middleware.go index ec03aa8..fd5afca 100644 --- a/middleware.go +++ b/middleware.go @@ -39,7 +39,7 @@ func AuthorizationMiddleware(fetch gobwebs.UserFetch) echo.MiddlewareFunc { req := c.Request() gctx := c.(*server.Context) header := req.Header.Get("Authorization") - if header == "" { + if header != "" { z := strings.SplitN(header, " ", 2) if len(z) != 2 { return fmt.Errorf("Invalid Authorization header") -- 2.45.2