Hi Andy,
These settings for setting http response and by default they are enabled. I was looking for stripping off the xss script code from http request params and headers. Here is what I did and seems working fine. I've created XSSFilter and added it to FilterChain by using below code. My implementation of getParam , getParams, getHeader methods strips off the xss injection code not getting into application code.
@Configuration("WebFilterConfiguration")
public class XifinWebFilterConfiguration {
@Bean
public FilterRegistrationBean xssFilter() {
FilterRegistrationBean filterRegBean = new FilterRegistrationBean();
filterRegBean.setFilter(new XSSFilter());
filterRegBean.addUrlPatterns("/*");
filterRegBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return filterRegBean;
}
}
Chava