fix: update session store configuration

- Change session cookie path from "/api" to "/"
- Remove HttpOnly flag
This commit is contained in:
1808837298@qq.com
2025-02-11 15:53:15 +08:00
parent 6acc37cf27
commit bbc1550a9e

View File

@@ -146,9 +146,8 @@ func main() {
// Initialize session store
store := cookie.NewStore([]byte(common.SessionSecret))
store.Options(sessions.Options{
Path: "/api",
Path: "/",
Secure: false,
HttpOnly: true,
})
server.Use(sessions.Sessions("session", store))