diff --git a/48.Spring-Boot-CORS-Support/src/main/java/com/example/demo/config/WebConfigurer.java b/48.Spring-Boot-CORS-Support/src/main/java/com/example/demo/config/WebConfigurer.java index e85b522a..1e1d3085 100644 --- a/48.Spring-Boot-CORS-Support/src/main/java/com/example/demo/config/WebConfigurer.java +++ b/48.Spring-Boot-CORS-Support/src/main/java/com/example/demo/config/WebConfigurer.java @@ -27,7 +27,7 @@ public FilterRegistrationBean corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); - config.addAllowedOrigin("*"); + config.addAllowedOriginPattern("*"); source.registerCorsConfiguration("/**", config); FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source)); bean.setOrder(0);