root: url quote redis passwords for connection string
closes https://github.com/goauthentik/helm/issues/39 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ef994e0084
commit
363aed2a47
|
@ -18,6 +18,7 @@ from hashlib import sha512
|
|||
from json import dumps
|
||||
from tempfile import gettempdir
|
||||
from time import time
|
||||
from urllib.parse import quote
|
||||
|
||||
import structlog
|
||||
from celery.schedules import crontab
|
||||
|
@ -223,7 +224,7 @@ CACHES = {
|
|||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": (
|
||||
f"{REDIS_PROTOCOL_PREFIX}:"
|
||||
f"{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:"
|
||||
f"{quote(CONFIG.y('redis.password'))}@{quote(CONFIG.y('redis.host'))}:"
|
||||
f"{int(CONFIG.y('redis.port'))}/{CONFIG.y('redis.cache_db')}"
|
||||
),
|
||||
"TIMEOUT": int(CONFIG.y("redis.cache_timeout", 300)),
|
||||
|
|
Reference in New Issue