mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 17:17:13 +08:00
feat: 入口不准设置成 /api
This commit is contained in:
@@ -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, "入口格式错误")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user