Skip to content

Commit f7b8243

Browse files
authored
Merge pull request #61 from MT-TEAM-Org/feat/PH-108
fix : localhost 도메인 cors 추가
2 parents b4e2b3e + 26e3d6f commit f7b8243

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/org/myteam/server/global/config/WebConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public CorsFilter corsFilter() {
2626
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
2727
CorsConfiguration config = new CorsConfiguration();
2828

29-
final String[] ALLOWED_ORIGIN = {frontUrl};
29+
final String[] ALLOWED_ORIGIN = {frontUrl, "http://localhost:3000"};
3030

3131
config.setAllowCredentials(true);
3232
config.setAllowedOrigins(Arrays.asList(ALLOWED_ORIGIN));

src/main/java/org/myteam/server/global/security/config/SecurityConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ public CorsConfigurationSource configurationSource() {
199199
configuration.addAllowedHeader("*");
200200
configuration.addAllowedMethod("*");
201201
configuration.addAllowedOriginPattern(frontUrl); // TODO_ 추후 변경 해야함 배포시
202+
configuration.addAllowedOriginPattern("http://localhost:3000"); // TODO_ 추후 변경 해야함 배포시
202203
configuration.setAllowCredentials(true);
203204
configuration.addExposedHeader(HEADER_AUTHORIZATION);
204205
configuration.addExposedHeader(REFRESH_TOKEN_KEY);

0 commit comments

Comments
 (0)