mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-06 04:34:37 +08:00
use middleware.Path for base path comparison
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user