Skip to content

Commit 95557fe

Browse files
committed
Deploy: Cors 프론트 배포 연결
1 parent 69b6f03 commit 95557fe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

backend/src/main/java/com/together/backend/global/config/CorsMvcConfig.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ public class CorsMvcConfig implements WebMvcConfigurer {
99
@Override
1010
public void addCorsMappings(CorsRegistry corsRegistry) {
1111
corsRegistry.addMapping("/**")
12+
.allowedOrigins(
13+
"http://localhost:3000",
14+
"https://7-together.kro.kr" // 개발용
15+
)
16+
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
17+
.allowedHeaders("*")
1218
.exposedHeaders("Set-Cookie")
13-
.allowedOrigins("http://localhost:3000"); // 프론트엔드의 주소로 변경 필요
19+
.allowCredentials(true);
1420
}
1521
}

0 commit comments

Comments
 (0)