From f89041c12fb34431134203dd26f19da6f93f3a4a Mon Sep 17 00:00:00 2001 From: Martin Marcher Date: Tue, 8 Mar 2011 19:33:44 +0100 Subject: [PATCH] listen on 127.0.0.1 by default instead of 0.0.0.0 There shouldn't be any worries about opening up an unsecured application just because it is run with the defaults. --- web/application.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/application.py b/web/application.py index 8d4b859c..571d2da3 100755 --- a/web/application.py +++ b/web/application.py @@ -133,7 +133,7 @@ def add_processor(self, processor): self.processors.append(processor) def request(self, localpart='/', method='GET', data=None, - host="0.0.0.0:8080", headers=None, https=False, **kw): + host="127.0.0.1:8080", headers=None, https=False, **kw): """Makes request to this application for the specified path and method. Response will be a storage object with data, status and headers. @@ -161,10 +161,10 @@ def request(self, localpart='/', method='GET', data=None, ... >>> response = app.request("/redirect") >>> response.headers['Location'] - 'http://0.0.0.0:8080/foo' + 'http://127.0.0.1:8080/foo' >>> response = app.request("/redirect", https=True) >>> response.headers['Location'] - 'https://0.0.0.0:8080/foo' + 'https://127.0.0.1:8080/foo' The headers argument specifies HTTP headers as a mapping object such as a dict.