Skip to content

Commit

Permalink
fix: CORS 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Haewonny committed Jan 12, 2024
1 parent 2bd7e81 commit 7ec2aff
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public class WebMvcConfig implements WebMvcConfigurer {
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000")
.allowedMethods("OPTIONS","GET","POST","PUT","DELETE");
.allowedMethods("OPTIONS","GET","POST","PUT","DELETE")
.allowedMethods("*")
.allowCredentials(false)
.maxAge(3000);
}
}

0 comments on commit 7ec2aff

Please sign in to comment.