Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Documented cookie problem for #80

  • Loading branch information...
commit f8f8463f3a0e260604b066de56b0a8c7d3a86db4 1 parent 85ff63c
@mitsuhiko authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 docs/config.rst
19 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:
.. versionadded:: 0.4
Please sign in to comment.
Something went wrong with that request. Please try again.