Permalink
Browse files

Add gzip filter to web.xml.

Not adding a configuration option because I can't think of a reason you
wouldn't want this.
  • Loading branch information...
1 parent 0a83ed8 commit e4cbafee0980697729075e9eb5a2249679a6a37d Xavier Shay & Taylor Phillips committed Jun 13, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 web_inf_files/web.xml.erb
View
@@ -59,6 +59,20 @@
</filter-mapping>
<% end %>
+ <filter>
+ <filter-name>GzipFilter</filter-name>
+ <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
+ <init-param>
+ <param-name>mimeTypes</param-name>
+ <param-value>text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>GzipFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
<servlet>
<servlet-name>RackServlet</servlet-name>
<servlet-class>org.jruby.rack.RackServlet</servlet-class>

0 comments on commit e4cbafe

Please sign in to comment.