From 6eaf32e067ae3edb2df1dac7075b2c2a18a58eeb Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 23 Apr 2023 16:04:59 +0800 Subject: [PATCH] =?UTF-8?q?5=E7=A7=92=E7=9B=BE=E2=80=9C=E5=8A=A0=E5=85=A5I?= =?UTF-8?q?P=E7=99=BD=E5=90=8D=E5=8D=95=E2=80=9D=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BAtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/uam_config.go | 7 +++++++ 1 file changed, 7 insertions(+) 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 {