Merge pull request #1315 from alphagov/callback-ip-whitelist

Remove ip whitelist from callbacks
This commit is contained in:
Leo Hemsted
2017-10-16 13:55:06 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -117,9 +117,13 @@ def register_blueprint(application):
ses_callback_blueprint.before_request(requires_no_auth)
application.register_blueprint(ses_callback_blueprint)
sms_callback_blueprint.before_request(restrict_ip_sms)
# delivery receipts
# TODO: make sure research mode can still trigger sms callbacks, then re-enable this
# sms_callback_blueprint.before_request(restrict_ip_sms)
sms_callback_blueprint.before_request(requires_no_auth)
application.register_blueprint(sms_callback_blueprint)
# inbound sms
receive_notifications_blueprint.before_request(restrict_ip_sms)
application.register_blueprint(receive_notifications_blueprint)

View File

@@ -54,8 +54,8 @@ def send_sms_to_provider(notification):
if service.research_mode or notification.key_type == KEY_TYPE_TEST:
notification.billable_units = 0
update_notification(notification, provider)
send_sms_response(provider.get_name(), str(notification.id), notification.to)
update_notification(notification, provider)
else:
try:
provider.send_sms(