mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 02:48:38 -06:00
Fixes Cacheops with a password protected redis
As per the [`README.rst`][1] of `django-cacheops`, if a password is added to the connection string, it must be in the form `redis://:password@host:port/db`. Notice the colon, which was missing from the implementation in [`settings.py`][2]. [1]:8ad970d55a/README.rst
[2]:39d9977234/netbox/netbox/settings.py (L349)
This commit is contained in:
parent
39d9977234
commit
3eef6ea28e
@ -346,7 +346,7 @@ else:
|
||||
REDIS_CACHE_CON_STRING = 'redis://'
|
||||
|
||||
if REDIS_PASSWORD:
|
||||
REDIS_CACHE_CON_STRING = '{}{}@'.format(REDIS_CACHE_CON_STRING, REDIS_PASSWORD)
|
||||
REDIS_CACHE_CON_STRING = '{}:{}@'.format(REDIS_CACHE_CON_STRING, REDIS_PASSWORD)
|
||||
|
||||
REDIS_CACHE_CON_STRING = '{}{}:{}/{}'.format(REDIS_CACHE_CON_STRING, REDIS_HOST, REDIS_PORT, REDIS_CACHE_DATABASE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user