5秒盾“加入IP白名单”默认为true

This commit is contained in:
GoEdgeLab
2023-04-23 16:04:59 +08:00
parent 29ec12ffa9
commit 6eaf32e067

View File

@@ -9,10 +9,17 @@ type UAMConfig struct {
IsPrior bool `yaml:"isPrior" json:"isPrior"`
IsOn bool `yaml:"isOn" json:"isOn"`
AddToWhiteList bool `yaml:"addToWhiteList" json:"addToWhiteList"` // 是否将IP加入到白名单
OnlyURLPatterns []*shared.URLPattern `yaml:"onlyURLPatterns" json:"onlyURLPatterns"` // 仅限的URL
ExceptURLPatterns []*shared.URLPattern `yaml:"exceptURLPatterns" json:"exceptURLPatterns"` // 排除的URL
}
func NewUAMConfig() *UAMConfig {
return &UAMConfig{
AddToWhiteList: true,
}
}
func (this *UAMConfig) Init() error {
// only urls
for _, pattern := range this.OnlyURLPatterns {