summaryrefslogtreecommitdiffstats
path: root/webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml')
-rw-r--r--webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml b/webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml
new file mode 100644
index 0000000000..59cc040678
--- /dev/null
+++ b/webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+<!--
+
+ Jetty configuration to correctly handle SSL/HTTPS traffic when
+ Apache is handling the SSL and proxying over plain HTTP to us.
+
+ Requires Jetty 7.0.0.RC6 (or later).
+
+ * Copy this file to $JETTY_HOME/etc/jetty_sslproxy.xml
+ * Add jetty_sslproxy to your start line:
+
+ $JETTY_HOME/bin/jetty.sh start jetty-logging jetty jetty_sslproxy
+
+ * Configure Apache to set X-Forwarded-Scheme on requests:
+
+ RequestHeader set X-Forwarded-Scheme https
+
+-->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+ <Get id="oldHandler" name="handler"/>
+ <Set name="handler">
+ <New class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
+ <Set name="handler"><Ref id="oldHandler"/></Set>
+ <Set name="rules">
+ <Array type="org.eclipse.jetty.rewrite.handler.Rule">
+ <Item>
+ <New class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule">
+ <Set name="header">X-Forwarded-Scheme</Set>
+ <Set name="headerValue">https</Set>
+ <Set name="scheme">https</Set>
+ </New>
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Set>
+</Configure>