diff --git a/customHeaders.go b/customHeaders.go index f7c78e8..f001a32 100644 --- a/customHeaders.go +++ b/customHeaders.go @@ -111,9 +111,7 @@ func customHeadersMiddleware(next http.Handler) http.Handler { var matches bool if configEntry.UsesRegex() { - if configEntry.CompiledRegex.MatchString(r.URL.Path) { - matches = true - } + matches = configEntry.CompiledRegex.MatchString(r.URL.Path) } else { matches = // Check if the file extension matches.