Files
gerrit/gerrit-war/src/main/webapp/WEB-INF/extra/jetty7/jetty_sslproxy.xml
Chad Horohoe 88bc137dad Fixing URL to Jetty XML DTDs so they can be properly validated.
The old URL seems to be dead, and from looking around I found
this page <http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax>
which pointed to the new DTD.

Change-Id: I97c6f1f3442f4e13f80ad46528945794c81b5493
2012-05-04 10:52:56 -04:00

39 lines
1.3 KiB
XML

<?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>