diff --git a/pkg/serverconfigs/uam_config.go b/pkg/serverconfigs/uam_config.go index 01a5987..0dba724 100644 --- a/pkg/serverconfigs/uam_config.go +++ b/pkg/serverconfigs/uam_config.go @@ -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 {