Skip to content

Commit

Permalink
Merge pull request #37 from goormthon-Univ/dev
Browse files Browse the repository at this point in the history
[Fix] CORS 에러 해결
  • Loading branch information
namkikim0718 authored Mar 23, 2024
2 parents a7172ca + ca0bc14 commit 20d1bf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/groom/wisebab/config/CorsMvcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class CorsMvcConfig implements WebMvcConfigurer {
public void addCorsMappings(CorsRegistry corsRegistry) {

corsRegistry.addMapping("/**")
.allowedOrigins("http://localhost:3000");
.allowedOrigins("*");
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/groom/wisebab/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {

CorsConfiguration configuration = new CorsConfiguration();

configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000"));
configuration.setAllowedOrigins(Collections.singletonList("*"));
configuration.setAllowedMethods(Collections.singletonList("*"));
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(Collections.singletonList("*"));
Expand Down

0 comments on commit 20d1bf3

Please sign in to comment.