Added password for redis

This commit is contained in:
Thastertyn 2024-03-28 21:22:23 +01:00
parent 7342516ce7
commit aef6dd2761
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ class MySqlConfig:
class RedisConfig: class RedisConfig:
REDIS_HOST = os.environ.get('REDIS_HOST') REDIS_HOST = os.environ.get('REDIS_HOST')
REDIS_PORT = os.environ.get('REDIS_PORT') REDIS_PORT = os.environ.get('REDIS_PORT')
REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD')
class FlaskProduction: class FlaskProduction:
DEBUG = False DEBUG = False

View File

@ -15,6 +15,7 @@ db_connection = mysql.connector.connect(
jwt_redis_blocklist = redis.StrictRedis( jwt_redis_blocklist = redis.StrictRedis(
host=RedisConfig.REDIS_HOST, host=RedisConfig.REDIS_HOST,
port=RedisConfig.REDIS_PORT, port=RedisConfig.REDIS_PORT,
password=RedisConfig.REDIS_PASSWORD,
db=0, db=0,
decode_responses=True decode_responses=True
) )