From adfa6d398e44d68a4a4eb09bdbd5adfd539b4e09 Mon Sep 17 00:00:00 2001 From: Alex Tan Date: Sat, 10 Jul 2021 12:19:43 -0500 Subject: [PATCH] Simplify conditional --- customHeaders.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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.