diff --git a/ythdd_api.py b/ythdd_api.py index 0672e68..d78bd68 100644 --- a/ythdd_api.py +++ b/ythdd_api.py @@ -14,8 +14,8 @@ def api_greeting(): def api_global_catchall(received_request): ythdd_globals.apiRequests += 1 - if request.environ['REMOTE_ADDR'] != "127.0.0.1" or (ythdd_globals.isProxied and request.environ['X-Forwarded-For'] != "127.0.0.1"): - ythdd_globals.outsideApiHits += 1 + if request.environ['REMOTE_ADDR'] != "127.0.0.1" or (ythdd_globals.isProxied and request.environ['HTTP_X_FORWARDED_FOR'] != "127.0.0.1"): + ythdd_globals.outsideApiHits += 1 request_list = received_request.split('/') api_version = request_list[0]