禁止设置安全入口为登录地址

This commit is contained in:
zhangchenhao
2025-05-08 16:34:52 +08:00
parent 4c196c8dbf
commit bb0b610cc6
2 changed files with 16 additions and 2 deletions

View File

@@ -85,6 +85,10 @@ func main() {
if secure[0] != '/' {
secure = "/" + secure
}
if secure == "/login" {
fmt.Println("安全入口不能是/login")
return
}
err := public.UpdateSetting("secure", secure)
if err != nil {
fmt.Println("Error updating setting:", err)