-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
jetty-rewrite.xml
36 lines (32 loc) · 1.45 KB
/
jetty-rewrite.xml
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
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- =========================================================== -->
<!-- configure rewrite handler -->
<!-- =========================================================== -->
<Call name="insertHandler">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
<Set name="rewriteRequestURI" property="jetty.rewrite.rewriteRequestURI" />
<Set name="rewritePathInfo" property="jetty.rewrite.rewritePathInfo" />
<Set name="originalPathAttribute"><Property name="jetty.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>
<Get id="Rewrite" name="ruleContainer" />
<!-- see rewrite-rules.xml in $JETTY_BASE for how to add a rule(s) -->
</New>
</Arg>
</Call>
</Configure>