Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0f37c7c5bb29831696f5637482e78a24f35122b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">

  <!-- =========================================================== -->
  <!-- configure rewrite handler                                   -->
  <!-- =========================================================== -->
  <Call name="insertHandler">
    <Arg>
      <New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
	<Set name="rewriteRequestURI"><Property name="jetty.rewrite.rewriteRequestURI" deprecated="rewrite.rewriteRequestURI" default="true"/></Set>
	<Set name="rewritePathInfo"><Property name="jetty.rewrite.rewritePathInfo" deprecated="rewrite.rewritePathInfo" default="false"/></Set>
	<Set name="originalPathAttribute"><Property name="jetty.rewrite.originalPathAttribute" deprecated="rewrite.originalPathAttribute" default="requestedPath"/></Set>
     
	<!-- Set DispatcherTypes  -->
	<Set name="dispatcherTypes">
	  <Array type="javax.servlet.DispatcherType">
	    <Item><Call class="javax.servlet.DispatcherType" name="valueOf"><Arg>REQUEST</Arg></Call></Item>
	    <Item><Call class="javax.servlet.DispatcherType" name="valueOf"><Arg>ASYNC</Arg></Call></Item>
	  </Array>
	</Set>

	<!-- example rule -->
	<!--
	<Call name="addRule">
	  <Arg>
	    <New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
	      <Set name="pattern">/favicon.ico</Set>
	      <Set name="name">Cache-Control</Set>
	      <Set name="value">Max-Age=3600,public</Set>
	      <Set name="terminating">true</Set>
	    </New>
	  </Arg>
	</Call>
	-->

      </New>
    </Arg>
  </Call>
</Configure>

Back to the top