diff --git a/matcher.go b/matcher.go index 80a852a7..d6b82a4d 100644 --- a/matcher.go +++ b/matcher.go @@ -88,3 +88,12 @@ func pathMatchesAny(requestPath string, rules []string) bool { return false } +func hasStaticAssetExtension(requestPath string) bool { + for _, extension := range []string{".css", ".js", ".mjs", ".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".woff", ".woff2"} { + if strings.HasSuffix(requestPath, extension) { + return true + } + } + return false +} +