Permalink
Browse files

Documented cookie problem for #80

  • Loading branch information...
1 parent 85ff63c commit f8f8463f3a0e260604b066de56b0a8c7d3a86db4 @mitsuhiko mitsuhiko committed Jul 14, 2010
Showing with 19 additions and 0 deletions.
  1. +19 −0 docs/config.rst
View
@@ -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``

0 comments on commit f8f8463

Please sign in to comment.