From c382c885e4b92f5a3ec68cf14a005ee6f569a5cf Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Sat, 16 May 2015 16:57:57 +0100 Subject: [PATCH] use middleware.Path for base path comparison --- middleware/rewrite/rewrite.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }