Corrected CSRF reference in middleware docs.

This commit is contained in:
tommcn 2022-03-16 21:12:31 -04:00 committed by Mariusz Felisiak
parent 9c04af837a
commit 8e63390640
1 changed files with 5 additions and 4 deletions

View File

@ -297,10 +297,11 @@ for:
.. warning::
When your site is served via HTTPS, :ref:`Django's CSRF protection system
<using-csrf>` requires the ``Referer`` header to be present, so completely
disabling the ``Referer`` header will interfere with CSRF protection. To
gain most of the benefits of disabling ``Referer`` headers while also
keeping CSRF protection, consider enabling only same-origin referrers.
<how-csrf-works>` requires the ``Referer`` header to be present, so
completely disabling the ``Referer`` header will interfere with CSRF
protection. To gain most of the benefits of disabling ``Referer`` headers
while also keeping CSRF protection, consider enabling only same-origin
referrers.
``SecurityMiddleware`` can set the ``Referrer-Policy`` header for you, based on
the :setting:`SECURE_REFERRER_POLICY` setting (note spelling: browsers send a