Skip to content

Commit

Permalink
Add a note on how root_path should be used
Browse files Browse the repository at this point in the history
This follows WSGI, as root_path is considered the equivalent to
SCRIPT_NAME and ensures that the root_path can be used as a global
prefix to all routes in the application.
  • Loading branch information
pgjones committed Jan 21, 2021
1 parent cf99cb7 commit 192cffa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions specs/www.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,17 @@ with the close code passed in the message (or 1000 if none is specified).
spec. Optional; if missing defaults to ``1000``.


Path, raw_path and root_path
----------------------------

The ``root_path``, defaulting to ``""``, should match the start of any
request target, if it doesn't the server should respond with a 404
response. The ``path`` should then be constructed as the ``raw_path``
excluding the ``root_path`` prefix. In the case where the resulting
``path`` is equal to the empty string, ``""``, it should be set to
``"/"``.


WSGI Compatibility
------------------

Expand Down

0 comments on commit 192cffa

Please sign in to comment.