use of org.springframework.boot.web.servlet.FilterRegistrationBean in project libresonic by Libresonic.
the class Application method bootstrapVerificationFilterRegistration.
@Bean
public FilterRegistrationBean bootstrapVerificationFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(bootstrapVerificationFiler());
registration.addUrlPatterns("/*");
registration.setName("BootstrapVerificationFilter");
registration.setOrder(1);
return registration;
}
use of org.springframework.boot.web.servlet.FilterRegistrationBean in project libresonic by Libresonic.
the class Application method cacheFilterRegistration.
@Bean
public FilterRegistrationBean cacheFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(cacheFilter());
registration.addUrlPatterns("/icons/*", "/style/*", "/script/*", "/dwr/*", "/icons/*", "/coverArt.view", "/avatar.view");
registration.addInitParameter("Cache-Control", "max-age=36000");
registration.setName("CacheFilter");
registration.setOrder(5);
return registration;
}
use of org.springframework.boot.web.servlet.FilterRegistrationBean in project goci by EBISPOT.
the class SearchConfiguration method disableSpringBootErrorFilter.
@Bean
public FilterRegistrationBean disableSpringBootErrorFilter(ErrorPageFilter filter) {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
filterRegistrationBean.setFilter(filter);
filterRegistrationBean.setEnabled(false);
return filterRegistrationBean;
}
Aggregations