From c9013c4438c878c92b633e9ca2ee0f8844154fe6 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Fri, 20 Sep 2013 19:27:18 -0700 Subject: [PATCH] Make is_local_addr accept localhost. This is useful for minimal installs where the proxy lives on the same host as the app. --- r2/r2/lib/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/base.py b/r2/r2/lib/base.py index b3f168b99..f1ce03aba 100644 --- a/r2/r2/lib/base.py +++ b/r2/r2/lib/base.py @@ -42,7 +42,7 @@ logging.getLogger('scgi-wsgi').setLevel(logging.CRITICAL) def is_local_address(ip): # TODO: support the /20 and /24 private networks? make this configurable? - return ip.startswith('10.') + return ip.startswith('10.') or ip == "127.0.0.1" def abort(code_or_exception=None, detail="", headers=None, comment=None, **kwargs):