Skip to content

Commit

Permalink
Update docs for new "referrer_policy" Request.meta key
Browse files Browse the repository at this point in the history
  • Loading branch information
redapple committed Jan 18, 2017
1 parent 35725ff commit f43be28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/topics/request-response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Those are:
* :reqmeta:`download_maxsize`
* :reqmeta:`download_latency`
* :reqmeta:`proxy`
* :reqmeta:`referrer_policy`

.. reqmeta:: bindaddress

Expand Down
7 changes: 7 additions & 0 deletions docs/topics/spider-middleware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f43be28

Please sign in to comment.