We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35590cd commit b9cd3fdCopy full SHA for b9cd3fd
back/app_flask.py
@@ -357,7 +357,8 @@ def register():
357
358
if settings.country_check != '':
359
# anti bots
360
- r = requests.get(f"http://ip-api.com/json/{request.remote_addr}")
+ ip = request.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr)
361
+ r = requests.get(f"http://ip-api.com/json/{ip}")
362
if r.status_code == 200 and r.json()['country'] != settings.country_check:
363
return "Blocked", 403
364
0 commit comments