修复重写规则中没有匹配条件就无法生效的问题

This commit is contained in:
GoEdgeLab
2021-06-19 20:52:54 +08:00
parent 27c0a6f334
commit ef17c857b1
3 changed files with 3 additions and 3 deletions

View File

@@ -90,7 +90,7 @@ func (this *HTTPRewriteRule) MatchRequest(requestPath string, formatter func(sou
}
// 判断条件
if this.Conds != nil && !this.Conds.MatchRequest(formatter) {
if this.Conds != nil && this.Conds.HasRequestConds() && !this.Conds.MatchRequest(formatter) {
return "", nil, false
}