Fix cors allowedOrigin in spring security
@@ -55,7 +55,7 @@ public class DatafariWebSecurity {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
final CorsConfiguration configuration = new CorsConfiguration();
- configuration.setAllowedOrigins(ImmutableList.of("*"));
+ configuration.setAllowedOriginPatterns(ImmutableList.of("*"));
configuration.setAllowedMethods(ImmutableList.of("HEAD", "GET", "POST", "PUT", "DELETE", "PATCH"));
// setAllowCredentials(true) is important, otherwise:
// The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is
