Skip to content

Commit

Permalink
feat: 로컬과 프런트 URL에 대해 CORS 허용
Browse files Browse the repository at this point in the history
  • Loading branch information
hellomatia committed May 20, 2024
1 parent f1d4bbf commit 39ea0c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/mlog/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // 모든 경로에 대해
.allowedOrigins("*") // 모든 출처 허용
.allowedOrigins("http://localhost:5173", "http://m-log-view.s3-website-ap-southeast-2.amazonaws.com")
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // 모든 HTTP 메소드 허용
.allowedHeaders("*") // 모든 헤더 허용
.allowCredentials(true); // 쿠키를 포함한 요청 허용
Expand Down

0 comments on commit 39ea0c6

Please sign in to comment.