fix: fix cookie path

This commit is contained in:
JustSong
2024-11-10 12:56:06 +08:00
parent 9ea2b5ef9d
commit 03b3636d74
+5 -5
View File
@@ -65,11 +65,11 @@ func main() {
} else { } else {
store = cookie.NewStore([]byte(common.SessionSecret)) store = cookie.NewStore([]byte(common.SessionSecret))
} }
//store.Options(sessions.Options{ store.Options(sessions.Options{
// Path: "/", Path: "/",
// HttpOnly: true, HttpOnly: true,
// MaxAge: 30 * 24 * 3600, MaxAge: 30 * 24 * 3600,
//}) })
server.Use(sessions.Sessions("session", store)) server.Use(sessions.Sessions("session", store))
router.SetRouter(server, buildFS, indexPage) router.SetRouter(server, buildFS, indexPage)