mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-08 03:00:27 +08:00
修复域名跳转时没有携带参数的Bug
This commit is contained in:
@@ -146,6 +146,13 @@ func (this *HTTPRequest) doHostRedirect() (blocked bool) {
|
||||
u.Status = http.StatusTemporaryRedirect
|
||||
}
|
||||
this.processResponseHeaders(this.writer.Header(), u.Status)
|
||||
|
||||
// 参数
|
||||
var qIndex = strings.Index(this.uri, "?")
|
||||
if qIndex >= 0 {
|
||||
afterURL += this.uri[qIndex:]
|
||||
}
|
||||
|
||||
http.Redirect(this.RawWriter, this.RawReq, afterURL, u.Status)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user