You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bu...@apache.org on 2013/02/04 18:08:22 UTC

svn commit: r849366 - in /websites/staging/trafficserver/trunk: cgi-bin/ content/ content/docs/trunk/admin/plugins/header_filter/index.en.html

Author: buildbot
Date: Mon Feb  4 17:08:22 2013
New Revision: 849366

Log:
Staging update by buildbot for trafficserver

Modified:
    websites/staging/trafficserver/trunk/cgi-bin/   (props changed)
    websites/staging/trafficserver/trunk/content/   (props changed)
    websites/staging/trafficserver/trunk/content/docs/trunk/admin/plugins/header_filter/index.en.html

Propchange: websites/staging/trafficserver/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Feb  4 17:08:22 2013
@@ -1 +1 @@
-1442182
+1442184

Propchange: websites/staging/trafficserver/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Feb  4 17:08:22 2013
@@ -1 +1 @@
-1442182
+1442184

Modified: websites/staging/trafficserver/trunk/content/docs/trunk/admin/plugins/header_filter/index.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/admin/plugins/header_filter/index.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/admin/plugins/header_filter/index.en.html Mon Feb  4 17:08:22 2013
@@ -134,6 +134,30 @@ header in the request.</p>
 remap rule to delete headers in a later hook (e.g. when reading a response
 from the server). This is what actually makes the plugin even remotely
 useful.</p>
+<h1 id="Examples">Examples</h1>
+<h2 id="x-fwd-proto">Set X-Forwarded-Proto https on SSL connections</h2>
+<p>Often times a backend wants to know whether it's running under HTTP or HTTPS. While not
+regulated standard, we can use the <code>X-Forwarded-Proto</code> header for this purpose:</p>
+<div class="codehilite"><pre># plugin.config
+header_filter.so
+
+:::text
+# remap.config
+map http://example.org http://172.16.17.42:8080
+map https://example.org http://172.16.17.42:8080 @plugin=header_filter.so @pparam=/etc/trafficserver/x_fwd_proto.conf
+
+:::text
+/etc/trafficserver/x_fwd_proto.config
+[SEND_REQUEST_HDR]
+    X-Forwarded-Proto =https=
+</pre></div>
+
+
+<p>In the backend servers we can now pick this up and do appropriately set server variables
+that will be picked up by CGI programs for instance. In the case of Apache httpd backend,
+this can be acomplished with <a href="http://httpd.apache.org/docs/current/mod/mod_setenvif.html#setenvif"><code>mod\_setenvif</code></a>:</p>
+<div class="codehilite"><pre>SetEnvIf X-Forwarded-Proto https HTTPS=on SSL=on
+</pre></div>
         </div>
       </div>
       <div class="fourcol last docsnav">
@@ -163,7 +187,7 @@ useful.</p>
 
     <div id="footer" class="row">
     <div class="tencol">
-      Copyright  &copy; 2012
+      Copyright  &copy; 2013
       <a href="http://www.apache.org/">The Apache Software Foundation</a>.
       Licensed under
       the <a href="http://www.apache.org/licenses/">Apache License</a>,