From bbc1550a9efe0f5febac65ad3b943aae01e320be Mon Sep 17 00:00:00 2001 From: "1808837298@qq.com" <1808837298@qq.com> Date: Tue, 11 Feb 2025 15:53:15 +0800 Subject: [PATCH] fix: update session store configuration - Change session cookie path from "/api" to "/" - Remove HttpOnly flag --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index e309d509..8175df88 100644 --- a/main.go +++ b/main.go @@ -146,9 +146,8 @@ func main() { // Initialize session store store := cookie.NewStore([]byte(common.SessionSecret)) store.Options(sessions.Options{ - Path: "/api", - Secure: false, - HttpOnly: true, + Path: "/", + Secure: false, }) server.Use(sessions.Sessions("session", store))