diff --git a/middleware/rewrite/rewrite.go b/middleware/rewrite/rewrite.go index b426b360..aefb2329 100644 --- a/middleware/rewrite/rewrite.go +++ b/middleware/rewrite/rewrite.go @@ -109,7 +109,7 @@ func (r *RegexpRule) Rewrite(req *http.Request) bool { rPath := req.URL.Path // validate base - if !strings.HasPrefix(rPath, r.Base) { + if !middleware.Path(rPath).Matches(r.Base) { return false }