mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Add support for configuring use of an SSL connection to Redis.
Requires a build or release of django-rq containing
44f3fdd7cb
This commit is contained in:
parent
dd7249d2ef
commit
e544705256
@ -283,6 +283,7 @@ REDIS = {
|
|||||||
'PASSWORD': '',
|
'PASSWORD': '',
|
||||||
'DATABASE': 0,
|
'DATABASE': 0,
|
||||||
'DEFAULT_TIMEOUT': 300,
|
'DEFAULT_TIMEOUT': 300,
|
||||||
|
'SSL': False,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -315,3 +316,9 @@ The TCP port to use when connecting to the Redis server.
|
|||||||
Default: None
|
Default: None
|
||||||
|
|
||||||
The password to use when authenticating to the Redis server (optional).
|
The password to use when authenticating to the Redis server (optional).
|
||||||
|
|
||||||
|
### SSL
|
||||||
|
|
||||||
|
Default: False
|
||||||
|
|
||||||
|
Use secure sockets layer to encrypt the connections to the Redis server.
|
||||||
|
@ -22,6 +22,7 @@ class ExtrasConfig(AppConfig):
|
|||||||
port=settings.REDIS_PORT,
|
port=settings.REDIS_PORT,
|
||||||
db=settings.REDIS_DATABASE,
|
db=settings.REDIS_DATABASE,
|
||||||
password=settings.REDIS_PASSWORD or None,
|
password=settings.REDIS_PASSWORD or None,
|
||||||
|
ssl=settings.REDIS_SSL,
|
||||||
)
|
)
|
||||||
rs.ping()
|
rs.ping()
|
||||||
except redis.exceptions.ConnectionError:
|
except redis.exceptions.ConnectionError:
|
||||||
|
@ -132,6 +132,7 @@ REDIS = {
|
|||||||
'PASSWORD': '',
|
'PASSWORD': '',
|
||||||
'DATABASE': 0,
|
'DATABASE': 0,
|
||||||
'DEFAULT_TIMEOUT': 300,
|
'DEFAULT_TIMEOUT': 300,
|
||||||
|
'SSL': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
# The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of
|
# The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of
|
||||||
|
@ -131,6 +131,7 @@ REDIS_PORT = REDIS.get('PORT', 6379)
|
|||||||
REDIS_PASSWORD = REDIS.get('PASSWORD', '')
|
REDIS_PASSWORD = REDIS.get('PASSWORD', '')
|
||||||
REDIS_DATABASE = REDIS.get('DATABASE', 0)
|
REDIS_DATABASE = REDIS.get('DATABASE', 0)
|
||||||
REDIS_DEFAULT_TIMEOUT = REDIS.get('DEFAULT_TIMEOUT', 300)
|
REDIS_DEFAULT_TIMEOUT = REDIS.get('DEFAULT_TIMEOUT', 300)
|
||||||
|
REDIS_SSL = REDIS.get('SSL', False)
|
||||||
|
|
||||||
# Email
|
# Email
|
||||||
EMAIL_HOST = EMAIL.get('SERVER')
|
EMAIL_HOST = EMAIL.get('SERVER')
|
||||||
@ -291,6 +292,7 @@ RQ_QUEUES = {
|
|||||||
'DB': REDIS_DATABASE,
|
'DB': REDIS_DATABASE,
|
||||||
'PASSWORD': REDIS_PASSWORD,
|
'PASSWORD': REDIS_PASSWORD,
|
||||||
'DEFAULT_TIMEOUT': REDIS_DEFAULT_TIMEOUT,
|
'DEFAULT_TIMEOUT': REDIS_DEFAULT_TIMEOUT,
|
||||||
|
'SSL': REDIS_SSL,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user