Simplify conditional

This commit is contained in:
Alex Tan 2021-07-10 12:19:43 -05:00
parent d5b3eace4a
commit adfa6d398e

View file

@ -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.