修复URL域名跳转设置可能不生效的问题

This commit is contained in:
GoEdgeLab
2023-09-20 08:21:22 +08:00
parent 8bdf86e993
commit 75a579cb4f

View File

@@ -139,11 +139,6 @@ func (this *HTTPRequest) doHostRedirect() (blocked bool) {
}
}
// 如果跳转前后域名一致,则终止
if u.DomainAfter == reqHost {
return false
}
var scheme = u.DomainAfterScheme
if len(scheme) == 0 {
scheme = this.requestScheme()
@@ -155,6 +150,11 @@ func (this *HTTPRequest) doHostRedirect() (blocked bool) {
return false
}
// 如果跳转前后域名一致,则终止
if u.DomainAfter == reqHost {
return false
}
this.ProcessResponseHeaders(this.writer.Header(), status)
// 参数