Add anonymous redis session expiration configuration

This commit is contained in:
Patrick Tombez committed 2020-01-27 15:56:22 +01:00
1 parent 20c0138588
commit 5fcef3926f
3 files changed
+14 -2

No files matched your search

+2
View File
@@ -41,6 +41,7 @@ port = int(os.environ.get('ODOO_SESSION_REDIS_PORT', 6379))
prefix = os.environ.get('ODOO_SESSION_REDIS_PREFIX')
password = os.environ.get('ODOO_SESSION_REDIS_PASSWORD')
expiration = os.environ.get('ODOO_SESSION_REDIS_EXPIRATION')
anon_expiration = os.environ.get('ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS')
@lazy_property
@@ -53,6 +54,7 @@ def session_store(self):
redis_client = redis.Redis(host=host, port=port, password=password)
return RedisSessionStore(redis=redis_client, prefix=prefix,
expiration=expiration,
anon_expiration=anon_expiration,
session_class=http.OpenERPSession)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.