diff --git a/pkg/serverconfigs/http_cache_ref.go b/pkg/serverconfigs/http_cache_ref.go index e76409a..d8523c0 100644 --- a/pkg/serverconfigs/http_cache_ref.go +++ b/pkg/serverconfigs/http_cache_ref.go @@ -29,7 +29,8 @@ type HTTPCacheRef struct { EnableIfNoneMatch bool `yaml:"enableIfNoneMatch" json:"enableIfNoneMatch"` EnableIfModifiedSince bool `yaml:"enableIfModifiedSince" json:"enableIfModifiedSince"` - Conds *shared.HTTPRequestCondsConfig `yaml:"conds" json:"conds"` // 请求条件 + Conds *shared.HTTPRequestCondsConfig `yaml:"conds" json:"conds"` // 复杂请求条件组合 + SimpleCond *shared.HTTPRequestCond `yaml:"simpleCond" json:"simpleCond"` // 简单条件 CachePolicy *HTTPCachePolicy `yaml:"cachePolicy" json:"cachePolicy"` @@ -69,6 +70,13 @@ func (this *HTTPCacheRef) Init() error { } } + if this.SimpleCond != nil { + err := this.SimpleCond.Init() + if err != nil { + return err + } + } + // policy if this.CachePolicy != nil { err := this.CachePolicy.Init()