From f8f8463f3a0e260604b066de56b0a8c7d3a86db4 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 14 Jul 2010 02:50:41 +0200 Subject: [PATCH] Documented cookie problem for #80 --- docs/config.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/config.rst b/docs/config.rst index 0e8a24cd..7d5bd6fc 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -64,6 +64,25 @@ The following configuration values are used internally by Flask: subdomain support (eg: ``'localhost'``) =============================== ========================================= +.. admonition:: More on ``SERVER_NAME`` + + The ``SERVER_NAME`` key is used for the subdomain support. Because + Flask cannot guess the subdomain part without the knowledge of the + actual server name, this is required if you want to work with + subdomains. This is also used for the session cookie. + + Please keep in mind that not only Flask has the problem of not knowing + what subdomains are, your web browser does as well. Most modern web + browsers will not allow cross-subdomain cookies to be set on a + server name without dots in it. So if your server name is + ``'localhost'`` you will not be able to set a cookie for + ``'localhost'`` and every subdomain of it. Please chose a different + server name in that case, like ``'myapplication.local'`` and add + this name + the subdomains you want to use into your host config + or setup a local `bind`_. + +.. _bind: https://www.isc.org/software/bind + .. versionadded:: 0.4 ``LOGGER_NAME``