aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/admin.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/command/admin.go b/weed/command/admin.go
index c1b55f105..8321aad80 100644
--- a/weed/command/admin.go
+++ b/weed/command/admin.go
@@ -198,6 +198,13 @@ func startAdminServer(ctx context.Context, options AdminOptions) error {
return fmt.Errorf("failed to generate session key: %w", err)
}
store := cookie.NewStore(sessionKeyBytes)
+
+ // Configure session options to ensure cookies are properly saved
+ store.Options(sessions.Options{
+ Path: "/",
+ MaxAge: 3600 * 24, // 24 hours
+ })
+
r.Use(sessions.Sessions("admin-session", store))
// Static files - serve from embedded filesystem