1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 06:43:43 +00:00

Update docs for new "referrer_policy" Request.meta key

This commit is contained in:
Paul Tremberth 2017-01-18 16:29:20 +01:00
parent e249abc32b
commit 03ff19d188
2 changed files with 8 additions and 0 deletions

View File

@ -307,6 +307,7 @@ Those are:
* :reqmeta:`proxy`
* ``ftp_user`` (See :setting:`FTP_USER` for more info)
* ``ftp_password`` (See :setting:`FTP_PASSWORD` for more info)
* :reqmeta:`referrer_policy`
.. reqmeta:: bindaddress

View File

@ -337,6 +337,8 @@ REFERER_POLICY
Default: ``'scrapy.spidermiddlewares.referer.DefaultReferrerPolicy'``
.. reqmeta:: referrer_policy
`Referrer Policy`_ to apply when populating Request "Referer" header.
This setting accepts:
@ -370,6 +372,11 @@ using ``file://`` or ``s3://`` scheme.
``same-origin`` may be a better choice if you want to remove referrer
information for cross-domain requests.
.. note::
You can also override the Referrer Policy per request,
using the special ``"referrer_policy"`` :ref:`Request.meta <topics-request-meta>` key,
with the same acceptable values as for the ``REFERER_POLICY`` setting.
.. _Referrer Policy: https://www.w3.org/TR/referrer-policy
.. _"no-referrer": https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
.. _"no-referrer-when-downgrade": https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer-when-downgrade