From f1749c782362c7748c48e217e5c2122739d53501 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Thu, 14 Aug 2014 08:40:52 +0200 Subject: [PATCH] Move custom header to include --- doc/cache-invalidator.rst | 10 +++------- doc/includes/custom-headers.rst | 3 +++ doc/proxy-clients.rst | 4 +--- 3 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 doc/includes/custom-headers.rst diff --git a/doc/cache-invalidator.rst b/doc/cache-invalidator.rst index b74a6a19..aa3763d5 100644 --- a/doc/cache-invalidator.rst +++ b/doc/cache-invalidator.rst @@ -51,6 +51,8 @@ Invalidate a URL with added header(s):: array('Cookie' => 'foo=bar; fizz=bang') )->flush(); +.. include:: includes/custom-headers.rst + Refreshing Paths and URLs ------------------------- @@ -74,13 +76,7 @@ Refresh a URL with added header(s):: array('Cookie' => 'foo=bar; fizz=bang') )->flush(); -Optionally adding headers with invalidation request -------------------------------------------------------- - -.. note:: - If adding the same headers on every invalidation request it would be preferrable - to apply these headers automatically rather than passing them explictly each time. - You can use a custom guzzle client to achieve this. See `Custom Guzzle Client` under :doc:`proxy clients `. +.. include:: includes/custom-headers.rst .. _invalidate regex: diff --git a/doc/includes/custom-headers.rst b/doc/includes/custom-headers.rst new file mode 100644 index 00000000..bfd31bb6 --- /dev/null +++ b/doc/includes/custom-headers.rst @@ -0,0 +1,3 @@ +This allows you to pass headers that are different between purge requests. +If you want to add a header to all purge requests, such as ``Authorization``, +use a :ref:`custom Guzzle client ` instead. diff --git a/doc/proxy-clients.rst b/doc/proxy-clients.rst index b1ec47bd..f05ee39c 100644 --- a/doc/proxy-clients.rst +++ b/doc/proxy-clients.rst @@ -114,9 +114,7 @@ For instance:: Please note that purge will invalidate all variants, so you do not have to send any headers that you vary on, such as ``Accept``. -The above allows you to pass headers that are different between purge requests. -If you want to send headers for all purge requests, such as ``Authorization``, -use a :ref:`custom Guzzle client ` instead. +.. include:: includes/custom-headers.rst Refresh ~~~~~~~