From e79f69d3052826c6b2f112ec728956d95ac40a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E4=B8=B9?= <569616226@qq.com> Date: Wed, 1 Feb 2023 16:34:41 +0800 Subject: [PATCH] change check array type addMutil --- server/web/web_gin/index.go | 4 +++- server/web/web_iris/index.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/web/web_gin/index.go b/server/web/web_gin/index.go index b128e446..501d1fa6 100644 --- a/server/web/web_gin/index.go +++ b/server/web/web_gin/index.go @@ -104,7 +104,9 @@ func (ws *WebServer) GetEngine() *gin.Engine { func (ws *WebServer) AddWebStatic(staticAbsPath, webPrefix string, paths ...string) { webPrefixs := strings.Split(web.CONFIG.System.WebPrefix, ",") wp := arr.NewCheckArrayType(2) - wp.AddMutil(webPrefixs[0], webPrefixs[1]) + for _, webPrefix := range webPrefixs { + wp.Add(webPrefix) + } if wp.Check(webPrefix) { return } diff --git a/server/web/web_iris/index.go b/server/web/web_iris/index.go index f5db9442..e5e5cbcc 100644 --- a/server/web/web_iris/index.go +++ b/server/web/web_iris/index.go @@ -82,7 +82,9 @@ func (ws *WebServer) AddModule(parties ...Party) { func (ws *WebServer) AddWebStatic(staticAbsPath, webPrefix string, paths ...string) { webPrefixs := strings.Split(web.CONFIG.System.WebPrefix, ",") wp := arr.NewCheckArrayType(2) - wp.AddMutil(webPrefixs[0], webPrefixs[1]) + for _, webPrefix := range webPrefixs { + wp.Add(webPrefix) + } if wp.Check(webPrefix) { return }