Load jwt_key from config

This commit is contained in:
Matthias
2020-05-10 19:42:06 +02:00
parent c3f0b5d4eb
commit 21c2af2b92
3 changed files with 8 additions and 2 deletions

View File

@@ -91,7 +91,8 @@ class ApiServer(RPC):
self.app = Flask(__name__)
# Setup the Flask-JWT-Extended extension
self.app.config['JWT_SECRET_KEY'] = 'super-secret' # Change this!
self.app.config['JWT_SECRET_KEY'] = self._config['api_server'].get(
'jwt_secret_key', 'super-secret')
self.jwt = JWTManager(self.app)
self.app.json_encoder = ArrowJSONEncoder