URL跳转规则支持匹配条件

This commit is contained in:
刘祥超
2021-06-09 21:44:59 +08:00
parent 3debe1d1df
commit 8cba12b4b5

View File

@@ -13,6 +13,9 @@ func (this *HTTPRequest) doHostRedirect() (blocked bool) {
if !u.IsOn {
continue
}
if !u.MatchRequest(this.Format) {
continue
}
if u.MatchPrefix { // 匹配前缀
if strings.HasPrefix(fullURL, u.BeforeURL) {
afterURL := u.AfterURL