You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make duration of HTTP sessions configurable #10522
Please make the duration of the sessions generated by HTTP form login configurable, with the option to never expire.
(Additionally, if an easy change while touching this code: please allow configuring the path for the session cookie, as it currently defaults to / which is incorrect if Syncthing is reverse-proxied with a path)
Problem or use case
I switched from HTTP Basic Authentication to form authentication because I was tired of having to login again everytime I restarted my browser. However, even in this situation, I am still presented with a login form about once per week. I would like to log in exactly once and stay forever logged in unless I explicitly clear my cookies.
Well we don't set an expire time afaik, so for your use case of not having to log in, that seems to be what we do currently. (Which does the thing for me, I am not asked to log in with that checkbox marked.)
Just checked with devtools, it does set an expire time. When POSTing to /rest/noauth/auth/password, the response contained the header (with values redacted):
Activity
calmh commentedon Jan 10, 2026
Isn't this the "stay logged in" checkbox on the login form?
koro666 commentedon Jan 10, 2026
That checkbox controls if the cookie is a session cookie or not.
calmh commentedon Jan 10, 2026
Well we don't set an expire time afaik, so for your use case of not having to log in, that seems to be what we do currently. (Which does the thing for me, I am not asked to log in with that checkbox marked.)
koro666 commentedon Jan 10, 2026
Just checked with devtools, it does set an expire time. When POSTing to
/rest/noauth/auth/password, the response contained the header (with values redacted):feat: make http session cookie path & duration configurable (fixes #1…
Merge remote-tracking branch 'upstream/main' into http_proxy
[codex] Merge upstream stable v2.1.1 into main (#23)