mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
modified the parsing of return ip address
This commit is contained in:
@@ -48,7 +48,7 @@ def restrict_ip_sms():
|
|||||||
ip = ''
|
ip = ''
|
||||||
if request.headers.getlist("X-Forwarded-For"):
|
if request.headers.getlist("X-Forwarded-For"):
|
||||||
ip0 = request.headers.getlist("X-Forwarded-For")
|
ip0 = request.headers.getlist("X-Forwarded-For")
|
||||||
ip1 = ip0.split(',');
|
ip1 = ip0.split(',')
|
||||||
ip = ip1[0]
|
ip = ip1[0]
|
||||||
|
|
||||||
if ip in current_app.config.get('ALLOW_IP_INBOUND_SMS'):
|
if ip in current_app.config.get('ALLOW_IP_INBOUND_SMS'):
|
||||||
|
|||||||
Reference in New Issue
Block a user