fix: fix cookie path

This commit is contained in:
JustSong
2024-11-10 12:49:03 +08:00
parent 04944427b8
commit 9ea2b5ef9d

10
main.go
View File

@@ -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)