mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-21 07:38:10 +00:00
change the session timeout to be configurable
This commit is contained in:
parent
199a307cd9
commit
97163b7cb0
@ -122,7 +122,9 @@ class Auth(JSONComponent):
|
|||||||
m.update(m.hexdigest())
|
m.update(m.hexdigest())
|
||||||
session_id = m.hexdigest()
|
session_id = m.hexdigest()
|
||||||
|
|
||||||
expires = int(time.time()) + 3600
|
config = component.get("DelugeWeb").config
|
||||||
|
|
||||||
|
expires = int(time.time()) + config["session_timeout"]
|
||||||
expires_str = time.strftime('%a, %d %b %Y %H:%M:%S UTC',
|
expires_str = time.strftime('%a, %d %b %Y %H:%M:%S UTC',
|
||||||
time.gmtime(expires))
|
time.gmtime(expires))
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ CONFIG_DEFAULTS = {
|
|||||||
"pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad",
|
"pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad",
|
||||||
"pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e",
|
"pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e",
|
||||||
"base": "",
|
"base": "",
|
||||||
|
"session_timeout": 3600,
|
||||||
"sessions": {},
|
"sessions": {},
|
||||||
"sidebar_show_zero": False,
|
"sidebar_show_zero": False,
|
||||||
"sidebar_show_trackers": False,
|
"sidebar_show_trackers": False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user