Merge pull request #186 from guardicore/bugfix/consistent_flask_secret_key

Make flask session key consistent between sessions
This commit is contained in:
Daniel Goldberg 2018-09-18 15:19:24 +03:00 committed by GitHub
commit df6dd194ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import os import os
import uuid
from datetime import datetime from datetime import datetime
import bson import bson
@ -83,7 +84,7 @@ def init_app(mongo_url):
app.config['MONGO_URI'] = mongo_url app.config['MONGO_URI'] = mongo_url
app.config['SECRET_KEY'] = os.urandom(32) app.config['SECRET_KEY'] = uuid.getnode()
app.config['JWT_AUTH_URL_RULE'] = '/api/auth' app.config['JWT_AUTH_URL_RULE'] = '/api/auth'
app.config['JWT_EXPIRATION_DELTA'] = env.get_auth_expiration_time() app.config['JWT_EXPIRATION_DELTA'] = env.get_auth_expiration_time()