支持brotli和deflate压缩方式

This commit is contained in:
GoEdgeLab
2021-09-29 19:37:32 +08:00
parent f90c362785
commit 8fabdd579e
16 changed files with 836 additions and 286 deletions

View File

@@ -40,8 +40,8 @@ func (this *HTTPRequestCondsConfig) Init() error {
}
// MatchRequest 判断请求是否匹配
func (this *HTTPRequestCondsConfig) MatchRequest(formatter func(s string) string) bool {
if !this.IsOn && len(this.Groups) == 0 {
func (this *HTTPRequestCondsConfig) MatchRequest(formatter Formatter) bool {
if !this.IsOn || len(this.Groups) == 0 {
return true
}
ok := false
@@ -63,7 +63,7 @@ func (this *HTTPRequestCondsConfig) MatchRequest(formatter func(s string) string
// MatchResponse 判断响应是否匹配
func (this *HTTPRequestCondsConfig) MatchResponse(formatter func(s string) string) bool {
if !this.IsOn && len(this.Groups) == 0 {
if !this.IsOn || len(this.Groups) == 0 {
return true
}
ok := false