From bed80a3472adc0b4432481d88860f037d5ed317f Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Wed, 21 Oct 2026 11:31:17 +0200 Subject: [PATCH] httpd: raise the default web session timeout to one hour 200 seconds was too short in practice: the UI stops polling while its tab is hidden, so looking at another tab for a few minutes ended the session. Make it 3600 seconds; "session " still overrides it. --- CHANGELOG.md | 5 +++++ README.md | 2 +- httpd/httpd.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82559d0c..c6faca2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,11 @@ ## Changed +- Web UI + - The web session expires after one hour without a request (was 200 seconds). The UI stops + polling while its tab is hidden, so with 200 seconds switching tabs for a few minutes logged + you out. `session ` still sets it. + ## Fixed - Time diff --git a/README.md b/README.md index 25c0a02d..95115ecf 100644 --- a/README.md +++ b/README.md @@ -356,7 +356,7 @@ netmask zzz.zzz.zzz.zzz = Network mask of the switch port x name xxx = Name xxx the port number x port z 1g = Set 1g speed for port z igmp on/off = Turn IGMP on or off -session xxxx = Web session timeout in seconds (default 200) +session xxxx = Web session timeout in seconds (default 3600) ``` [To be continue] diff --git a/httpd/httpd.c b/httpd/httpd.c index 5128cabb..4932ad29 100644 --- a/httpd/httpd.c +++ b/httpd/httpd.c @@ -12,7 +12,7 @@ // #define DEBUG #include "debug.h" -#define SESSION_TIMEOUT_DEFAULT 200 +#define SESSION_TIMEOUT_DEFAULT 3600 /* Seconds of inactivity after which a session cookie stops validating. * Configurable with the "session" command, see cmd_parser.c. */