Пример #1
0
 /*
  * Configure cors mapping for cross origin resource sharing
  */
 @Override
 public void addCorsMappings(CorsRegistry registry) {
   registry
       .addMapping("/api/**")
       .allowedMethods("GET", "POST", "PUT", "DELETE")
       .allowCredentials(false)
       .maxAge(3600);
 }
Пример #2
0
 @Override
 public void addCorsMappings(CorsRegistry registry) {
   registry.addMapping("/**");
 }
 @Override
 public void addCorsMappings(final CorsRegistry registry) {
   // enable CORS to be able for frontend to address rest api
   registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE");
 }