From 4701e5d9af6d7d078f8211d4d042a92af4b8e708 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Wed, 4 Dec 2019 15:26:49 +0000 Subject: [PATCH] don't define MMG_URL and FIRETEXT_URL in manifest these URLs never change, and it lead to surprising issues where an updated default MMG_URL wasn't actually respected on PaaS. These urls aren't private and don't need to be stored in credentials. By not defining them in the manifest, we expect them to use the default unless `cf set-env` has been specifically used to modify them in an app. --- app/config.py | 1 + manifest.yml.j2 | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/config.py b/app/config.py index 1865d255c..c207ff0dd 100644 --- a/app/config.py +++ b/app/config.py @@ -337,6 +337,7 @@ class Config(object): DOCUMENT_DOWNLOAD_API_HOST = os.environ.get('DOCUMENT_DOWNLOAD_API_HOST', 'http://localhost:7000') DOCUMENT_DOWNLOAD_API_KEY = os.environ.get('DOCUMENT_DOWNLOAD_API_KEY', 'auth-token') + # these environment vars aren't defined in the manifest so to set them on paas use `cf set-env` MMG_URL = os.environ.get("MMG_URL", "https://api.mmg.co.uk/jsonv2a/api.php") FIRETEXT_URL = os.environ.get("FIRETEXT_URL", "https://www.firetext.co.uk/api/sendsms/json") diff --git a/manifest.yml.j2 b/manifest.yml.j2 index 2484d9328..b68848adf 100644 --- a/manifest.yml.j2 +++ b/manifest.yml.j2 @@ -92,12 +92,10 @@ applications: ZENDESK_API_KEY: '{{ ZENDESK_API_KEY }}' - MMG_URL: '{{ MMG_URL }}' MMG_API_KEY: '{{ MMG_API_KEY }}' MMG_INBOUND_SMS_AUTH: '{{ MMG_INBOUND_SMS_AUTH | tojson }}' MMG_INBOUND_SMS_USERNAME: '{{ MMG_INBOUND_SMS_USERNAME | tojson }}' - FIRETEXT_URL: '{{ FIRETEXT_URL }}' FIRETEXT_API_KEY: '{{ FIRETEXT_API_KEY }}' FIRETEXT_INBOUND_SMS_AUTH: '{{ FIRETEXT_INBOUND_SMS_AUTH | tojson }}'