Play Framework Multiple Filters in Global.java
I am using Play Framework 2.3.2 (Java version)
I was wondering how I would like to add multiple filters for filter () override in Global.java? I have this to enable CSRF filter:
public class Global extends GlobalSettings {
@Override
public <T extends EssentialFilter> Class<T>[] filters() {
return new Class[]{CSRFFilter.class};
}
}
and now I would like to add a Gzip filter. What is the correct syntax to use both CSRF filter and GZIP compression? It is documented here: http://www.playframework.com/documentation/2.3.x/GzipEncoding , but it doesn't tell you how to add this as a filter when it already exists.
Thanks in advance!
+3
source to share