mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00: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]:86d5b48007/netbox/netbox/settings.py (L349)
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user