Skip to content

Commit f1749c7

Browse files
committed
Move custom header to include
1 parent 914337c commit f1749c7

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

doc/cache-invalidator.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Invalidate a URL with added header(s)::
5151
array('Cookie' => 'foo=bar; fizz=bang')
5252
)->flush();
5353

54+
.. include:: includes/custom-headers.rst
55+
5456
Refreshing Paths and URLs
5557
-------------------------
5658

@@ -74,13 +76,7 @@ Refresh a URL with added header(s)::
7476
array('Cookie' => 'foo=bar; fizz=bang')
7577
)->flush();
7678

77-
Optionally adding headers with invalidation request
78-
-------------------------------------------------------
79-
80-
.. note::
81-
If adding the same headers on every invalidation request it would be preferrable
82-
to apply these headers automatically rather than passing them explictly each time.
83-
You can use a custom guzzle client to achieve this. See `Custom Guzzle Client` under :doc:`proxy clients <proxy-clients>`.
79+
.. include:: includes/custom-headers.rst
8480

8581
.. _invalidate regex:
8682

doc/includes/custom-headers.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This allows you to pass headers that are different between purge requests.
2+
If you want to add a header to all purge requests, such as ``Authorization``,
3+
use a :ref:`custom Guzzle client <custom Guzzle client>` instead.

doc/proxy-clients.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ For instance::
114114
Please note that purge will invalidate all variants, so you do not have to
115115
send any headers that you vary on, such as ``Accept``.
116116

117-
The above allows you to pass headers that are different between purge requests.
118-
If you want to send headers for all purge requests, such as ``Authorization``,
119-
use a :ref:`custom Guzzle client <custom Guzzle client>` instead.
117+
.. include:: includes/custom-headers.rst
120118

121119
Refresh
122120
~~~~~~~

0 commit comments

Comments
 (0)