diff --git a/internal/nodes/http_request_host_redirect.go b/internal/nodes/http_request_host_redirect.go index 0772c5f..12837e7 100644 --- a/internal/nodes/http_request_host_redirect.go +++ b/internal/nodes/http_request_host_redirect.go @@ -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) // 参数