return frb;
}
@Bean
public FilterRegistrationBean corsFilterRegistrationBean() {
FilterRegistrationBean frb = new FilterRegistrationBean(new CORSFilter());
frb.addUrlPatterns(Api1.PATH + "*");
frb.addInitParameter("cors.allowed.methods", "GET,POST,PUT,DELETE,HEAD,OPTIONS");
frb.addInitParameter("cors.exposed.headers", "Cache-Control,Content-Length,Content-Type,Date,ETag,Expires");
frb.addInitParameter("cors.allowed.headers", "Origin,Accept,X-Requested-With,Content-Type,"
+ "Access-Control-Request-Method,Access-Control-Request-Headers,X-Amz-Credential,"
+ "X-Amz-Date,Authorization");
frb.setAsyncSupported(true);
frb.setEnabled(Config.CORS_ENABLED);
frb.setMatchAfter(true);
frb.setOrder(3);
return frb;
}