use of org.springframework.boot.web.servlet.FilterRegistrationBean in project cas by apereo.
the class CasManagementAuditConfiguration method casClientInfoLoggingFilter.
@Bean
public FilterRegistrationBean casClientInfoLoggingFilter() {
final FilterRegistrationBean bean = new FilterRegistrationBean();
bean.setFilter(new ClientInfoThreadLocalFilter());
bean.setUrlPatterns(Collections.singleton("/*"));
bean.setName("CAS Client Info Logging Filter");
bean.setAsyncSupported(true);
return bean;
}
use of org.springframework.boot.web.servlet.FilterRegistrationBean in project scoold by Erudika.
the class ScooldServer method csrfFilterRegistrationBean.
/**
* @return CSRF protection filter bean
*/
@Bean
public FilterRegistrationBean csrfFilterRegistrationBean() {
String path = "/*";
logger.debug("Initializing CSRF filter [{}]...", path);
FilterRegistrationBean frb = new FilterRegistrationBean(new CsrfFilter());
frb.setDispatcherTypes(EnumSet.of(DispatcherType.REQUEST));
frb.setName("csrfFilter");
frb.setAsyncSupported(true);
frb.addUrlPatterns(path);
frb.setMatchAfter(false);
frb.setEnabled(true);
frb.setOrder(2);
return frb;
}
use of org.springframework.boot.web.servlet.FilterRegistrationBean in project libresonic by Libresonic.
the class Application method parameterDecodingFilterRegistration.
@Bean
public FilterRegistrationBean parameterDecodingFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(parameterDecodingFilter());
registration.addUrlPatterns("/*");
registration.setName("ParameterDecodingFilter");
registration.setOrder(2);
return registration;
}
use of org.springframework.boot.web.servlet.FilterRegistrationBean in project libresonic by Libresonic.
the class Application method noCacheFilterRegistration.
@Bean
public FilterRegistrationBean noCacheFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(noCacheFilter());
registration.addUrlPatterns("/statusChart.view", "/userChart.view", "/playQueue.view", "/podcastChannels.view", "/podcastChannel.view", "/help.view", "/top.view", "/home.view");
registration.addInitParameter("Cache-Control", "no-cache, post-check=0, pre-check=0");
registration.addInitParameter("Pragma", "no-cache");
registration.addInitParameter("Expires", "Thu, 01 Dec 1994 16:00:00 GMT");
registration.setName("NoCacheFilter");
registration.setOrder(6);
return registration;
}
use of org.springframework.boot.web.servlet.FilterRegistrationBean in project libresonic by Libresonic.
the class Application method requestEncodingFilterRegistration.
@Bean
public FilterRegistrationBean requestEncodingFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(requestEncodingFilter());
registration.addUrlPatterns("/*");
registration.addInitParameter("encoding", "UTF-8");
registration.setName("RequestEncodingFilter");
registration.setOrder(4);
return registration;
}
Aggregations