-
-
Notifications
You must be signed in to change notification settings - Fork 102
Labels
enhancementNew feature or requestNew feature or request
Description
Support for rediss:// URLs with authentication in Redis configuration.
Description
It's currently not possible to easily use a Redis server that requires a secure connection over TLS (rediss://) and password authentication.
Here’s the relevant code logic we observed:
if not REDIS_PASS:
CHANNEL_REDIS_HOST = f'redis://{REDIS_HOST}:{REDIS_PORT}/1'
else:
CHANNEL_REDIS_HOST = f'redis://:{REDIS_PASS}@{REDIS_HOST}:{REDIS_PORT}/1'
if not REDIS_PASS:
CELERY_BROKER_URL = f'redis://{REDIS_HOST}:{REDIS_PORT}/2'
else:
CELERY_BROKER_URL = f'redis://:{REDIS_PASS}@{REDIS_HOST}:{REDIS_PORT}/2'
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': f'redis://{REDIS_HOST}:{REDIS_PORT}/0',
}
}Suggested improvement
Allow full override of Redis URLs via environment variables (e.g., CHANNEL_REDIS_URL, CELERY_BROKER_URL, REDIS_CACHE_URL) so users can specify secure schemes like rediss:// and custom credentials.
Alternatively, extend the logic to support:
- Custom Redis scheme (
redis://vsrediss://) - Custom Redis user
- Optional authentication
This would improve compatibility with Redis services that enforce TLS and user-based authentication.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done