use of com.erudika.scoold.utils.CsrfFilter 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;
}
Aggregations