mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-08 07:42:27 +08:00
btn submit pointer
This commit is contained in:
1
front.go
1
front.go
@@ -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
Reference in New Issue
Block a user