ソースを参照

fix: update session store configuration

- Change session cookie path from "/api" to "/"
- Remove HttpOnly flag
1808837298@qq.com 1 年間 前
コミット
bbc1550a9e
1 ファイル変更2 行追加3 行削除
  1. 2 3
      main.go

+ 2 - 3
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))