mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-05 00:34:01 +08:00
缓存关闭X-Cache显示时从Header中删除X-Cache
This commit is contained in:
@@ -252,6 +252,8 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
|
|||||||
} else {
|
} else {
|
||||||
this.writer.Header().Set("X-Cache", "HIT, "+refType+", "+reader.TypeName())
|
this.writer.Header().Set("X-Cache", "HIT, "+refType+", "+reader.TypeName())
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.writer.Header().Del("X-Cache")
|
||||||
}
|
}
|
||||||
if this.web.Cache.AddAgeHeader {
|
if this.web.Cache.AddAgeHeader {
|
||||||
this.writer.Header().Set("Age", age)
|
this.writer.Header().Set("Age", age)
|
||||||
|
|||||||
Reference in New Issue
Block a user