Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Bean
- CorsConfigurationSource corsConfigurationSource() {
- CorsConfiguration configuration = new CorsConfiguration();
- configuration.setAllowCredentials(true);
- configuration.addAllowedOrigin("http://localhost:8080");
- configuration.addAllowedHeader("*");
- configuration.addAllowedMethod("*");
- UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
- source.registerCorsConfiguration("/**", configuration);
- return source;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement