Skip to content
Myr

security docs for TRUSTED_HOSTS

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

authored by David Lord · committed by David Lord · parent ff64079 · Browse files · 1 file+21 added−0 removed
This commit

State

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

Diff stats

1 file+21 added−0 removed

  • other:+21 added−0 removed

1 file+21 added−0 removed

modified:docs/web-security.rst+21 added
267 unmodified lines
268269.. _samesite_support: https://caniuse.com/#feat=same-site-cookie-attribute270271272Host Header Validation273----------------------274275The ``Host`` header is used by the client to indicate what host name the request276was made to. This is used, for example, by ``url_for(..., _external=True)`` to277generate full URLs, for use in email or other messages outside the browser278window.279280By default the app doesn't know what host(s) it is allowed to be accessed281through, and assumes any host is valid. Although browsers do not allow setting282the ``Host`` header, requests made by attackers in other scenarios could set283the ``Host`` header to a value they want.284285When deploying your application, set :data:`TRUSTED_HOSTS` to restrict what286values the ``Host`` header may be.287288The ``Host`` header may be modified by proxies in between the client and your289application. See :doc:`deploying/proxy_fix` to tell your app which proxy values290to trust.291292293Copy/Paste to Terminal294----------------------295296Hidden characters such as the backspace character (``\b``, ``^H``) can
20 unmodified lines