Skip to content

Commit

Permalink
Merge pull request #39 from saessagMarket/feat/#38-fix-cors-config
Browse files Browse the repository at this point in the history
CORS 설정 오류 수정
  • Loading branch information
ahyeonkong authored Jan 18, 2025
2 parents 3f51f48 + 509dc29 commit 3c5f628
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,10 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();

// 개발 환경과 배포 환경 모두 설정
// 개발 환경과 배포 환경을 하나의 List로 설정
config.setAllowedOrigins(List.of(
"http://localhost:3000"
));

config.setAllowedOrigins(List.of(
"https://saessagmarket.netlify.app"
"http://localhost:3000", // 로컬 개발 서버
"https://saessagmarket.netlify.app" // Netlify 배포 환경
));
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
config.setAllowedHeaders(List.of("*"));
Expand Down

0 comments on commit 3c5f628

Please sign in to comment.