diff --git a/app/cloudfoundry_config.py b/app/cloudfoundry_config.py index 3ad142bc1..7d0920b6a 100644 --- a/app/cloudfoundry_config.py +++ b/app/cloudfoundry_config.py @@ -2,12 +2,6 @@ import json import os -def find_by_service_name(services, service_name): - for i in range(len(services)): - if services[i]['name'] == service_name: - return services[i] - return None - def extract_cloudfoundry_config(): vcap_services = json.loads(os.environ['VCAP_SERVICES']) @@ -15,19 +9,3 @@ def extract_cloudfoundry_config(): os.environ['SQLALCHEMY_DATABASE_URI'] = vcap_services['aws-rds'][0]['credentials']['uri'].replace('postgres','postgresql') # Redis config os.environ['REDIS_URL'] = vcap_services['aws-elasticache-redis'][0]['credentials']['uri'].replace('redis://','rediss://') - - # CSV Upload Bucket Name - bucket_service = find_by_service_name(vcap_services['s3'], f"notifications-api-csv-upload-bucket-{os.environ['DEPLOY_ENV']}") - if bucket_service: - os.environ['CSV_UPLOAD_BUCKET_NAME'] = bucket_service['credentials']['bucket'] - os.environ['CSV_UPLOAD_ACCESS_KEY'] = bucket_service['credentials']['access_key_id'] - os.environ['CSV_UPLOAD_SECRET_KEY'] = bucket_service['credentials']['secret_access_key'] - os.environ['CSV_UPLOAD_REGION'] = bucket_service['credentials']['region'] - - # Contact List Bucket Name - bucket_service = find_by_service_name(vcap_services['s3'], f"notifications-api-contact-list-bucket-{os.environ['DEPLOY_ENV']}") - if bucket_service: - os.environ['CONTACT_LIST_BUCKET_NAME'] = bucket_service['credentials']['bucket'] - os.environ['CONTACT_LIST_ACCESS_KEY'] = bucket_service['credentials']['access_key_id'] - os.environ['CONTACT_LIST_SECRET_KEY'] = bucket_service['credentials']['secret_access_key'] - os.environ['CONTACT_LIST_REGION'] = bucket_service['credentials']['region'] diff --git a/app/config.py b/app/config.py index d64873dad..a481ff00c 100644 --- a/app/config.py +++ b/app/config.py @@ -537,7 +537,7 @@ class Staging(Config): # LETTER_SANITISE_BUCKET_NAME = 'staging-letters-sanitise' FROM_NUMBER = 'stage' API_RATE_LIMIT_ENABLED = True - CHECK_PROXY_HEADER = True + CHECK_PROXY_HEADER = False class Live(Config): @@ -562,7 +562,7 @@ class Live(Config): FROM_NUMBER = 'US Notify' API_RATE_LIMIT_ENABLED = True - CHECK_PROXY_HEADER = True + CHECK_PROXY_HEADER = False SES_STUB_URL = None CRONITOR_ENABLED = True