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, "入口格式错误") }