better syntax for redis host

master
Aevann 2023-02-26 10:02:07 +02:00
parent 4c35f0b07f
commit d500257729
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ def before_request():
g.nonce = secrets.token_urlsafe(31) g.nonce = secrets.token_urlsafe(31)
import redis import redis
host = environ.get("REDIS_URL", "redis://localhost").split('://')[1].split(':6379')[0] host = environ.get("REDIS_URL", "redis://localhost").split(':')[1]
r = redis.Redis(host=host, port=6379, db=0) r = redis.Redis(host=host, port=6379, db=0)
@app.after_request @app.after_request