From 567d0e0979db08fb6378b1935ce1e6ec3b5d5907 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 9 Jun 2019 18:22:14 +0200 Subject: [PATCH] Get the secret key from envvars --- royalnet/web/flaskserver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/royalnet/web/flaskserver.py b/royalnet/web/flaskserver.py index ed22c245..1e31804a 100644 --- a/royalnet/web/flaskserver.py +++ b/royalnet/web/flaskserver.py @@ -1,5 +1,6 @@ import typing import flask as f +import os from ..database import Alchemy from .royalprint import Royalprint @@ -7,6 +8,7 @@ from .royalprint import Royalprint def create_app(config_obj: typing.Type, blueprints: typing.List[Royalprint]): app = f.Flask(__name__) app.config.from_object(config_obj) + app.secret_key = os.environ["SECRET_KEY"] required_tables = set() for blueprint in blueprints: required_tables = required_tables.union(blueprint.required_tables)