更新 proxy/handler.go
This commit is contained in:
@@ -267,6 +267,10 @@ func (h *ProxyHandler) sendResponse(w http.ResponseWriter, resp *http.Response,
|
||||
|
||||
func (h *ProxyHandler) serveCached(w http.ResponseWriter, entry *cache.CacheEntry) {
|
||||
for key, value := range entry.Headers {
|
||||
// 跳过这些头,让 Go 自动处理
|
||||
if key == "Content-Encoding" || key == "Content-Length" {
|
||||
continue
|
||||
}
|
||||
w.Header().Set(key, value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user