diff options
| author | Yuval Adam <_@yuv.al> | 2018-10-11 17:13:41 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-10-11 17:13:41 +0200 |
| commit | 17bb72e403c2d29793640cba2fef99e1414c4465 (patch) | |
| tree | 68cd521576b1631f2dcd9a5f5254f48cbd713e27 | |
| parent | a8d2c41ee431cfa67c044caf39199ec45a7141fa (diff) | |
Update comment
| -rw-r--r-- | app.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -15,8 +15,9 @@ TEMPLATE = ''' def get_ip(request): if 'PROD' in environ: - # Heroku routing layers masks the original IP, fetch it from the custom header - # And make sure we just take the first IP in case other proxies were in the way + # Routing layers and proxies along the way might mask the original IP + # So fetch it from the custom header + # And make sure we just take the first (source) IP address ips = request.headers.get('X-Forwarded-For') return ips.split(',')[0] else: |
