2011-12-23 00:56:48 +00:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2012-11-22 21:42:15 +00:00
|
|
|
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
2011-12-23 00:56:48 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Configure a custom context for the eepsite.
|
|
|
|
|
2012-11-22 21:17:50 +00:00
|
|
|
This context contains only a ServletContextHandler with a default servlet
|
2011-12-23 00:56:48 +00:00
|
|
|
to serve static html files and images.
|
|
|
|
-->
|
|
|
|
|
2012-11-22 21:17:50 +00:00
|
|
|
<Configure class="org.eclipse.jetty.servlet.ServletContextHandler">
|
2011-12-23 00:56:48 +00:00
|
|
|
<Set name="contextPath">/</Set>
|
|
|
|
<Set name="resourceBase">./eepsite/docroot/</Set>
|
2012-11-22 21:17:50 +00:00
|
|
|
<Call name="setInitParameter">
|
2013-11-15 18:51:14 +00:00
|
|
|
<Arg>org.eclipse.jetty.servlet.Default.cacheControl</Arg>
|
2012-11-22 21:17:50 +00:00
|
|
|
<Arg>max-age=3600,public</Arg>
|
2012-03-14 12:04:20 +00:00
|
|
|
</Call>
|
2018-03-10 16:56:59 +00:00
|
|
|
<!-- change to true to allow directory listings -->
|
|
|
|
<Call name="setInitParameter">
|
|
|
|
<Arg>org.eclipse.jetty.servlet.Default.dirAllowed</Arg>
|
|
|
|
<Arg>false</Arg>
|
|
|
|
</Call>
|
2012-03-16 12:11:31 +00:00
|
|
|
<Call name="setMimeTypes">
|
|
|
|
<Arg>
|
2012-11-22 21:17:50 +00:00
|
|
|
<New class="org.eclipse.jetty.http.MimeTypes">
|
2012-03-16 12:11:31 +00:00
|
|
|
<Call name="addMimeMapping">
|
|
|
|
<Arg>sud</Arg>
|
|
|
|
<Arg>application/zip</Arg>
|
|
|
|
</Call>
|
|
|
|
<Call name="addMimeMapping">
|
|
|
|
<Arg>su2</Arg>
|
|
|
|
<Arg>application/zip</Arg>
|
|
|
|
</Call>
|
|
|
|
<Call name="addMimeMapping">
|
|
|
|
<Arg>xpi2p</Arg>
|
|
|
|
<Arg>application/zip</Arg>
|
|
|
|
</Call>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
2012-03-09 20:00:18 +00:00
|
|
|
<Call name="addServlet">
|
2017-05-05 19:53:43 +00:00
|
|
|
<Arg>net.i2p.servlet.I2PDefaultServlet</Arg>
|
2012-03-09 20:00:18 +00:00
|
|
|
<Arg>/</Arg>
|
|
|
|
</Call>
|
2016-01-20 22:40:11 +00:00
|
|
|
<Call name="addFilter">
|
|
|
|
<!-- Add a filter to gzip on-the fly, since if we don't do it, I2P will.
|
|
|
|
- This lowers the resource usage in the Java process on the client side,
|
|
|
|
- by pushing the decompression out of Java and into the browser.
|
|
|
|
- For all the reasons noted in the GzipFilter javadocs, this is normally
|
|
|
|
- a bad idea for static content, but this is I2P.
|
|
|
|
- See I2PTunnelHTTPServer for the I2P compressor.
|
|
|
|
-->
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.servlet.FilterHolder" >
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.servlets.GzipFilter" />
|
|
|
|
</Arg>
|
|
|
|
<Call name="setInitParameter">
|
|
|
|
<!-- minimum in Java is 1300 -->
|
|
|
|
<Arg>minGzipSize</Arg>
|
|
|
|
<Arg>512</Arg>
|
|
|
|
</Call>
|
|
|
|
<Call name="setInitParameter">
|
|
|
|
<!-- In Java we have a blacklist. This covers the most common cases. -->
|
|
|
|
<Arg>mimeTypes</Arg>
|
|
|
|
<Arg>application/pdf,application/x-javascript,application/xhtml+xml,application/xml,image/svg+xml,text/css,text/html,text/plain</Arg>
|
|
|
|
</Call>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
<Arg>/*</Arg>
|
|
|
|
<Arg>
|
|
|
|
<!-- just guessing here -->
|
|
|
|
<Call class="java.util.EnumSet" name="of" >
|
|
|
|
<Arg>
|
|
|
|
<Call class="javax.servlet.DispatcherType" name="valueOf" >
|
|
|
|
<Arg>REQUEST</Arg>
|
|
|
|
</Call>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
2011-12-23 00:56:48 +00:00
|
|
|
</Configure>
|
|
|
|
|