diff --git a/util.go b/util.go index 3e2ca885..69967412 100644 --- a/util.go +++ b/util.go @@ -118,3 +118,7 @@ func requestPaths(r *http.Request) []string { return result } +func pathMatches(path, rule string) bool { + return path == rule || strings.HasPrefix(path, rule+"/") +} +