Advertisement
Guest User

Untitled

a guest
Nov 1st, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @Bean
  2. CorsConfigurationSource corsConfigurationSource() {
  3. CorsConfiguration configuration = new CorsConfiguration();
  4. configuration.setAllowCredentials(true);
  5. configuration.addAllowedOrigin("http://localhost:8080");
  6. configuration.addAllowedHeader("*");
  7. configuration.addAllowedMethod("*");
  8. UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
  9. source.registerCorsConfiguration("/**", configuration);
  10. return source;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement