mirror of
https://github.com/songquanpeng/message-pusher.git
synced 2025-09-26 20:21:22 +08:00
fix: fix cookie path
This commit is contained in:
10
main.go
10
main.go
@@ -65,11 +65,11 @@ func main() {
|
||||
} else {
|
||||
store = cookie.NewStore([]byte(common.SessionSecret))
|
||||
}
|
||||
//store.Options(sessions.Options{
|
||||
// Path: "/",
|
||||
// HttpOnly: true,
|
||||
// MaxAge: 30 * 24 * 3600,
|
||||
//})
|
||||
store.Options(sessions.Options{
|
||||
Path: "/",
|
||||
HttpOnly: true,
|
||||
MaxAge: 30 * 24 * 3600,
|
||||
})
|
||||
server.Use(sessions.Sessions("session", store))
|
||||
|
||||
router.SetRouter(server, buildFS, indexPage)
|
||||
|
Reference in New Issue
Block a user