内容压缩功能增加“例外URL“和“限制URL”设置

This commit is contained in:
GoEdgeLab
2024-04-17 13:56:38 +08:00
parent 7af6bfd536
commit 440823621c

View File

@@ -619,12 +619,13 @@ func (this *HTTPWriter) PrepareCompression(resp *http.Response, size int64) {
return
}
// 分区内容不压缩,防止读取失败
if !this.compressionConfig.EnablePartialContent && this.StatusCode() == http.StatusPartialContent {
// 检查URL
if !this.compressionConfig.MatchURL(this.req.URL()) {
return
}
if this.compressionConfig.Level < 0 {
// 分区内容不压缩,防止读取失败
if !this.compressionConfig.EnablePartialContent && this.StatusCode() == http.StatusPartialContent {
return
}