mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-26 23:16:35 +08:00
缓存条件增加“强制Range回源选项”
This commit is contained in:
@@ -90,6 +90,13 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// 是否强制Range回源
|
||||
if this.cacheRef.AlwaysForwardRangeRequest && len(this.RawReq.Header.Get("Range")) > 0 {
|
||||
this.cacheRef = nil
|
||||
cacheBypassDescription = "BYPASS, forward range"
|
||||
return
|
||||
}
|
||||
|
||||
// 是否正在Purge
|
||||
var isPurging = this.web.Cache.PurgeIsOn && strings.ToUpper(this.RawReq.Method) == "PURGE" && this.RawReq.Header.Get("X-Edge-Purge-Key") == this.web.Cache.PurgeKey
|
||||
if isPurging {
|
||||
|
||||
Reference in New Issue
Block a user