btn submit pointer

This commit is contained in:
deepzz0
2016-10-23 00:35:12 +08:00
parent 3ce2b21588
commit d8da70c3e6
2 changed files with 1 additions and 2 deletions

View File

@@ -32,7 +32,6 @@ func Filter() gin.HandlerFunc {
func UserCookie(c *gin.Context) {
cookie, err := c.Request.Cookie("u")
if err != nil || cookie.Value == "" {
// TODO cookie操作
b := []byte(c.ClientIP() + time.Now().String())
c.SetCookie("u", fmt.Sprintf("%x", SHA1(b)), 86400*999, "/", "", true, true)
}

File diff suppressed because one or more lines are too long