trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [1/3] trafficserver git commit: Add a Cache-Control header example to header_rewrite.en.rst.
Date Thu, 17 Mar 2016 04:10:40 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 73dedc34b -> 63e3b2db9


Add a Cache-Control header example to header_rewrite.en.rst.

Add an example of applying cache control headers at the CDN based
on origin path. This closes #524.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4dba248e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4dba248e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4dba248e

Branch: refs/heads/master
Commit: 4dba248e2c755f292b1e89f47f451d7278b629b4
Parents: 73dedc3
Author: Ryan Durfey <ryandurfey@users.noreply.github.com>
Authored: Mon Mar 14 10:30:04 2016 -0600
Committer: James Peach <jpeach@apache.org>
Committed: Wed Mar 16 20:54:12 2016 -0700

----------------------------------------------------------------------
 doc/admin-guide/plugins/header_rewrite.en.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4dba248e/doc/admin-guide/plugins/header_rewrite.en.rst
----------------------------------------------------------------------
diff --git a/doc/admin-guide/plugins/header_rewrite.en.rst b/doc/admin-guide/plugins/header_rewrite.en.rst
index 8100c41..3e98162 100644
--- a/doc/admin-guide/plugins/header_rewrite.en.rst
+++ b/doc/admin-guide/plugins/header_rewrite.en.rst
@@ -943,3 +943,14 @@ possible to accomplish::
     cond %{RANDOM:500} >290
     set-status 403
 
+Add Cache Control Headers Based on Origin Path
+----------------------------------------------
+
+This rule adds cache control headers to CDN responses based matching the origin path.  One
provides a max age and the other provides a “no-cache” statement to two different file
paths.
+
+cond %{SEND_RESPONSE_HDR_HOOK}  
+cond %{PATH} /examplepath1/
+add-header Cache-Control "max-age=3600" [L]
+cond %{SEND_RESPONSE_HDR_HOOK}  
+cond %{PATH} /examplepath2/examplepath3/.*/
+add-header Cache-Control "no-cache" [L]


Mime
View raw message