mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-03 01:26:34 +08:00
支持brotli和deflate压缩方式
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user