mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-18 03:35:10 +08:00
特殊页面选择读取URL时,保留当前的状态码
This commit is contained in:
@@ -23,7 +23,11 @@ func (this *HTTPRequest) doPage(status int) (shouldStop bool) {
|
||||
if page.Match(status) {
|
||||
if len(page.BodyType) == 0 || page.BodyType == shared.BodyTypeURL {
|
||||
if urlPrefixRegexp.MatchString(page.URL) {
|
||||
this.doURL(http.MethodGet, page.URL, "", page.NewStatus, true)
|
||||
var newStatus = page.NewStatus
|
||||
if newStatus <= 0 {
|
||||
newStatus = status
|
||||
}
|
||||
this.doURL(http.MethodGet, page.URL, "", newStatus, true)
|
||||
return true
|
||||
} else {
|
||||
file := Tea.Root + Tea.DS + page.URL
|
||||
|
||||
Reference in New Issue
Block a user