Skip to content
Myr

flask uses 127.0.0.1 as host by default now. stupid chrome.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 260b4df · Browse files · 2 files+3 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−16 removed

  • other:+3 added−16 removed

2 files+3 added−16 removed

modified:docs/quickstart.rst+2 added-15 removed
28 unmodified lines
2930::3132 $ python hello.py33 * Running on http://localhost:5000/33 * Running on http://127.0.0.1:5000/3435Head over to `http://localhost:5000/ <http://localhost:5000/>`_, you should35Head over to `http://127.0.0.1:5000/ <http://127.0.0.1:5000/>`_, you should36see your hello world greeting.3738So what did that code do?39
13 unmodified lines
53 the Python interpreter and not used as imported module.5455To stop the server, hit control-C.5657.. admonition:: Troubleshooting5759 The browser is unable to access the server? Sometimes this is60 unfortunately caused by broken IPv6 support in your operating system,61 browser or a combination. For example on Snow Leopard Google Chrome is62 known to exhibit this behaviour.6364 If the browser does not load up the page, you can change the `app.run`65 call to force IPv4 usage::6667 if __name__ == '__main__':68 app.run(host='127.0.0.1')697058Debug Mode59----------6061Now that :meth:`~flask.Flask.run` method is nice to start a local
557 unmodified lines
modified:flask.py+1 added-1 removed
432 unmodified lines
433 """434 for func in self.template_context_processors:435 context.update(func())436437 def run(self, host='localhost', port=5000, **options):437 def run(self, host='127.0.0.1', port=5000, **options):438 """Runs the application on a local development server. If the439 :attr:`debug` flag is set the server will automatically reload440 for code changes and show a debugger in case an exception happened.441
363 unmodified lines