IP restriction for inbound sms test 2

This commit is contained in:
venusbb
2017-06-29 10:47:27 +01:00
parent 73e0432a69
commit 16571c5b3c
4 changed files with 16 additions and 9 deletions

View File

@@ -28,7 +28,10 @@ def receive_mmg_sms():
'DateRecieved': '2017-05-21+11%3A56%3A11'
}
"""
# This will inject the sender IP route to log
'''
current_app.logger.info("Inbound sms sender IP information {}".format(request.headers.getlist("X-Forwarded-For")))
'''
post_data = request.get_json()
inbound_number = strip_leading_forty_four(post_data['Number'])
@@ -51,8 +54,6 @@ def receive_mmg_sms():
provider_name="mmg")
tasks.send_inbound_sms_to_service.apply_async([str(inbound.id), str(service.id)], queue=QueueNames.NOTIFY)
current_app.logger.info(
'{} received inbound SMS with reference {} from MMG'.format(service.id, inbound.provider_reference))
return 'RECEIVED', 200