mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
修复验证码cookie
This commit is contained in:
@@ -99,7 +99,7 @@ func Sign(c *gin.Context) {
|
||||
_ = session.Save()
|
||||
// c.JSON(http.StatusBadRequest, public.ResERR("用户不存在"))
|
||||
// 设置cookie
|
||||
c.SetCookie("must_code", "1", 0, "/", "", false, true)
|
||||
c.SetCookie("must_code", "1", 0, "/", "", false, false)
|
||||
public.FailMsg(c, "用户不存在")
|
||||
return
|
||||
}
|
||||
@@ -137,7 +137,7 @@ func Sign(c *gin.Context) {
|
||||
_ = session.Save()
|
||||
// c.JSON(http.StatusOK, public.ResOK(0, nil, "登录成功"))
|
||||
// 设置cookie
|
||||
c.SetCookie("must_code", "1", -1, "/", "", false, true)
|
||||
c.SetCookie("must_code", "1", -1, "/", "", false, false)
|
||||
public.SuccessMsg(c, "登录成功")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -237,6 +237,9 @@ INSERT INTO settings (key, value, create_time, update_time, active, type) VALUES
|
||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "baidu", "type": "dns"}, []string{"name", "type"}, []any{"baidu", "dns"})
|
||||
|
||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "btwaf", "type": "host"}, []string{"name", "type"}, []any{"btwaf", "host"})
|
||||
|
||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "safeline", "type": "dns"}, []string{"name", "type"}, []any{"safeline", "host"})
|
||||
|
||||
}
|
||||
|
||||
func insertDefaultData(db *sql.DB, table, insertSQL string) {
|
||||
|
||||
Reference in New Issue
Block a user