This commit is contained in:
suyl
2021-07-13 17:03:30 +08:00
parent accd7a6ace
commit e13dc65845
2 changed files with 3 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ func Captcha(c *gin.Context, length ...int) {
}
captchaId := captcha.NewLen(l)
session := sessions.Default(c)
session.Set(c.ClientIP()+model.SessionKey, captchaId)
session.Set(model.SessionKey, captchaId)
_ = session.Save()
_ = Serve(c.Writer, c.Request, captchaId, ".png", "zh", false, w, h)
}