支持brotli和deflate压缩方式

This commit is contained in:
刘祥超
2021-09-29 19:37:32 +08:00
parent b488c76204
commit 04f47fe8ed
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