Skip to content

Commit a46e876

Browse files
committed
refactor: 프론트 도메인 추가
프론트 도메인을 백엔드 하위로 둠(쿠키 가져오기 위해서)
1 parent 5bb2e2d commit a46e876

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/example/log4u/common/config/SecurityConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
9090
CorsConfiguration configuration = new CorsConfiguration();
9191

9292
configuration.setAllowedOrigins(Collections.singletonList(UrlConstants.FRONT_URL));
93+
// 프론트 도메인을 백엔드 도메인 하위로 둘 경우
94+
configuration.setAllowedOrigins(Collections.singletonList(
95+
"http://web.ec2-13-209-127-186.ap-northeast-2.compute.amazonaws.com:3000"));
9396
configuration.setAllowedMethods(Collections.singletonList("*"));
9497
configuration.setAllowCredentials(true);
9598
configuration.setAllowedHeaders(Collections.singletonList("*"));

0 commit comments

Comments
 (0)