Skip to content

Commit

Permalink
Merge pull request #155 from prgrms-web-devcourse-final-project/develop
Browse files Browse the repository at this point in the history
wbd config 설정 변경
  • Loading branch information
rinklove authored Jan 24, 2025
2 parents a4eac98 + 0583851 commit 5ede65c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions RevUp-common/src/main/java/com/revup/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers)
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();

configuration.setAllowCredentials(true);
configuration.setAllowedOrigins(List.of(
"https://revup-eight.vercel.app/",
"https://revuprevup.o-r.kr",
Expand All @@ -41,9 +41,12 @@ public CorsConfigurationSource corsConfigurationSource() {
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
// 허용할 요청 헤더 설정
configuration.setAllowedHeaders(List.of(
"content-type" // 요청 데이터 타입
"Authorization",
"Content-Type",
"Origin",
"Cookie",
"credentials"
));
configuration.setAllowCredentials(true);

// 필요한 헤더만 노출
configuration.setExposedHeaders(List.of(
Expand Down

0 comments on commit 5ede65c

Please sign in to comment.