开启403/404重试后,仍然保留最后一次请求的源站内容

This commit is contained in:
刘祥超
2024-01-28 09:27:50 +08:00
parent 99bde764d5
commit a0a5ba8263

View File

@@ -93,8 +93,8 @@ func (this *HTTPRequest) doOriginRequest(failedOriginIds []int64, failedLnNodeId
if origin == nil {
origin = this.reverseProxy.NextOrigin(requestCall)
if origin != nil && origin.Id > 0 && (*failStatusCode >= 403 && *failStatusCode <= 404) && lists.ContainsInt64(failedOriginIds, origin.Id) {
this.writeCode(*failStatusCode, "", "")
return
shouldRetry = false
isLastRetry = true
}
}
requestCall.CallResponseCallbacks(this.writer)