From 0797d82005bab29a546075e9bb4a0e0007636c9d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 10 Feb 2020 22:55:43 +0000 Subject: [PATCH] bug fix to account for environment variables --- src/api/index.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api/index.py b/src/api/index.py index d3c32f7..ccf0478 100755 --- a/src/api/index.py +++ b/src/api/index.py @@ -28,6 +28,8 @@ import store from datetime import datetime import numpy as np import requests +import os + # from utils.transport import Couchdb, CouchdbReader PORT = 8100 if 'port' not in PARAMS else int(PARAMS['port']) ; @@ -43,6 +45,9 @@ stripe_keys = { stripe.api_key = stripe_keys['secret_key'].strip() +if os.environ['CLOUDVIEW_CONTEXT'] and os.environ['CLOUDVIEW_CONTEXT'] not in CONFIG['cloud-view']: + context = os.environ['CLOUDVIEW_CONTEXT'] + CONFIG['cloud-view'] = CONFIG['cloud-view'].replace('cloud-view',context) app = Flask(__name__) CORS(app)