mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-23 02:52:02 -05:00
Set CBC_PROXY_ENABLED per environment, not dynamically
Previously we looked at whether an environment was given AWS access keys to decide if the `CBC_PROXY_ENABLED` setting was true. Given that all environments (apart from development) are currently hooked up to our AWS cell broadcast accounts, it doesn't feel too useful to have a dynamic switch when we can just hardcode it. On top of that, this lays the groundwork for having `CBC_PROXY_ENABLED` to be True even if an individual application doesn't have the CBC PROXY aws access keys as in future only the broadcasts worker will have the AWS keys but all the other apps will know that cell broadcasting is indeed turned on for that environment.
This commit is contained in:
@@ -365,11 +365,10 @@ class Config(object):
|
||||
|
||||
AWS_REGION = 'eu-west-1'
|
||||
|
||||
CBC_PROXY_ENABLED = True
|
||||
CBC_PROXY_AWS_ACCESS_KEY_ID = os.environ.get('CBC_PROXY_AWS_ACCESS_KEY_ID', '')
|
||||
CBC_PROXY_AWS_SECRET_ACCESS_KEY = os.environ.get('CBC_PROXY_AWS_SECRET_ACCESS_KEY', '')
|
||||
|
||||
CBC_PROXY_ENABLED = bool(CBC_PROXY_AWS_ACCESS_KEY_ID)
|
||||
|
||||
ENABLED_CBCS = {BroadcastProvider.EE, BroadcastProvider.THREE, BroadcastProvider.O2, BroadcastProvider.VODAFONE}
|
||||
|
||||
# as defined in api db migration 0331_add_broadcast_org.py
|
||||
@@ -420,6 +419,8 @@ class Development(Config):
|
||||
API_RATE_LIMIT_ENABLED = True
|
||||
DVLA_EMAIL_ADDRESSES = ['success@simulator.amazonses.com']
|
||||
|
||||
CBC_PROXY_ENABLED = False
|
||||
|
||||
|
||||
class Test(Development):
|
||||
NOTIFY_EMAIL_DOMAIN = 'test.notify.com'
|
||||
|
||||
Reference in New Issue
Block a user