From bdc131434b72e1c862dca3b8c70b47d34795c167 Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Fri, 7 Aug 2020 01:58:41 +0200 Subject: [PATCH] [conf] set SECRET in environ --- halfapi/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/halfapi/conf.py b/halfapi/conf.py index 8141131..f253a28 100644 --- a/halfapi/conf.py +++ b/halfapi/conf.py @@ -47,6 +47,8 @@ if IS_PROJECT: try: with open(config.get('project', 'secret')) as secret_file: SECRET = secret_file.read() + # Set the secret so we can use it in domains + os.environ['HALFAPI_SECRET'] = SECRET except FileNotFoundError: print('There is no file like {}'.format(config.get('project', 'secret'))) sys.exit(1)