From 66ae4e45377def92508be353ca38bc15844de564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 27 Oct 2023 00:44:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A5=E5=8F=A3=E4=B8=8D=E5=87=86?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=88=90=20/api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/controllers/setting_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/http/controllers/setting_controller.go b/app/http/controllers/setting_controller.go index 34436fbf..c2684f14 100644 --- a/app/http/controllers/setting_controller.go +++ b/app/http/controllers/setting_controller.go @@ -72,7 +72,7 @@ func (r *SettingController) Save(ctx http.Context) http.Response { email := ctx.Request().Input("email") password := ctx.Request().Input("password") - if !regexp.MustCompile(`^/[^/]*[^/]$`).MatchString(entrance) { + if !regexp.MustCompile(`^/[^/]*[^/]$`).MatchString(entrance) || entrance == "/api" { return Error(ctx, http.StatusUnprocessableEntity, "入口格式错误") }