From 19cc57d78f64a2b02f5825b3dc4cbc1db62fa3b0 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 21 Oct 2022 18:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=AE=89=E5=85=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E5=9F=9F=E5=90=8D=E5=88=97=E8=A1=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=80=9A=E9=85=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/helpers/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/web/helpers/utils.go b/internal/web/helpers/utils.go index 3e3884d4..fe7f9f3c 100644 --- a/internal/web/helpers/utils.go +++ b/internal/web/helpers/utils.go @@ -4,6 +4,7 @@ import ( "github.com/TeaOSLab/EdgeAdmin/internal/events" nodes "github.com/TeaOSLab/EdgeAdmin/internal/rpc" "github.com/TeaOSLab/EdgeAdmin/internal/utils" + "github.com/TeaOSLab/EdgeCommon/pkg/configutils" "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs" "github.com/iwind/TeaGo/lists" @@ -145,7 +146,7 @@ func checkRequestSecurity(securityConfig *systemconfigs.SecurityConfig, req *htt if err == nil && len(realDomain) > 0 { domain = realDomain } - if !lists.ContainsString(securityConfig.AllowDomains, domain) { + if !configutils.MatchDomains(securityConfig.AllowDomains, domain) { return false } }