Skip to content

Commit

Permalink
Merge pull request #71 from dnd-side-project/feat/debug
Browse files Browse the repository at this point in the history
[Fix/#-] CORS 에러 수정을 위해 allowed origin 추가
  • Loading branch information
Starlight258 authored Feb 21, 2024
2 parents f7e9c8c + 07ba05c commit 570f471
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/dnd/timeet/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ public CorsConfigurationSource configurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.addAllowedHeader("*");
configuration.addAllowedMethod("*");
configuration.addAllowedOriginPattern("*");
configuration.addAllowedOrigin(frontlocalurl);
configuration.addAllowedOrigin("https://timeet.vercel.app");
// configuration.addAllowedOriginPattern("*");
configuration.setAllowCredentials(true); // 클라이언트에서 쿠키 요청 허용
configuration.addExposedHeader("Authorization"); // 권고사항

Expand All @@ -188,7 +190,7 @@ public CorsConfigurationSource configurationSource() {
// return source;
// }
//
// // 운영 환경용 CORS 설정
// 운영 환경용 CORS 설정
// @Bean
// @Profile("prod")
// public CorsConfigurationSource prodCorsConfigurationSource() {
Expand Down

0 comments on commit 570f471

Please sign in to comment.