mirror of
https://github.com/etesync/server
synced 2024-11-22 00:38:07 +00:00
Easy config: add support for setting redis URI.
This commit is contained in:
parent
ef69954b6d
commit
8485806046
@ -8,6 +8,7 @@ debug = false
|
|||||||
;media_url = /user-media/
|
;media_url = /user-media/
|
||||||
;language_code = en-us
|
;language_code = en-us
|
||||||
;time_zone = UTC
|
;time_zone = UTC
|
||||||
|
;redis_uri = redis://localhost:6379
|
||||||
|
|
||||||
[allowed_hosts]
|
[allowed_hosts]
|
||||||
allowed_host1 = example.com
|
allowed_host1 = example.com
|
||||||
|
@ -154,6 +154,9 @@ if any(os.path.isfile(x) for x in config_locations):
|
|||||||
TIME_ZONE = section.get("time_zone", TIME_ZONE)
|
TIME_ZONE = section.get("time_zone", TIME_ZONE)
|
||||||
DEBUG = section.getboolean("debug", DEBUG)
|
DEBUG = section.getboolean("debug", DEBUG)
|
||||||
|
|
||||||
|
if "redis_uri" in section:
|
||||||
|
ETEBASE_REDIS_URI = section.get("redis_uri")
|
||||||
|
|
||||||
if "allowed_hosts" in config:
|
if "allowed_hosts" in config:
|
||||||
ALLOWED_HOSTS = [y for x, y in config.items("allowed_hosts")]
|
ALLOWED_HOSTS = [y for x, y in config.items("allowed_hosts")]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user