ip session
This commit is contained in:
@@ -66,7 +66,7 @@ func Captcha(c *gin.Context, length ...int) {
|
||||
}
|
||||
captchaId := captcha.NewLen(l)
|
||||
session := sessions.Default(c)
|
||||
session.Set(model.SessionKey, captchaId)
|
||||
session.Set(c.ClientIP()+model.SessionKey, captchaId)
|
||||
_ = session.Save()
|
||||
_ = Serve(c.Writer, c.Request, captchaId, ".png", "zh", false, w, h)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user