# HG changeset patch # User Peter Sanchez # Date 1682533776 21600 # Wed Apr 26 12:29:36 2023 -0600 # Node ID ea3aaf68773d5c1bdb88a4116d597b086e17b220 # Parent 2291a0cec728226ac18759e7dec75f1cbc653835 Fixing header check diff --git a/middleware.go b/middleware.go --- a/middleware.go +++ b/middleware.go @@ -39,7 +39,7 @@ 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")