Modify: code style
This commit is contained in:
parent
e0ac1925d5
commit
2c2ee5b1c1
1 changed files with 1 additions and 0 deletions
|
@ -24,6 +24,7 @@ func Session(secret string) gin.HandlerFunc {
|
|||
} else {
|
||||
Store = memstore.NewStore([]byte(secret))
|
||||
}
|
||||
|
||||
// Also set Secure: true if using SSL, you should though
|
||||
Store.Options(sessions.Options{HttpOnly: true, MaxAge: 7 * 86400, Path: "/"})
|
||||
return sessions.Sessions("cloudreve-session", Store)
|
||||
|
|
Loading…
Add table
Reference in a new issue