Skip to content

Commit

Permalink
fix : securityConfig 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Feb 6, 2025
1 parent 54c0690 commit e19c4e8
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.util.List;

@Configuration
@EnableWebSecurity
@RequiredArgsConstructor
Expand Down Expand Up @@ -72,10 +70,7 @@ protected SecurityFilterChain config(HttpSecurity http) throws Exception {
public CorsConfigurationSource source() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.addExposedHeader("Authorization");

// 허용할 프론트엔드 도메인 설정 (여기에 실제 프론트엔드 URL을 입력)
configuration.setAllowedOrigins(List.of("https://y-edu-class.com", "https://develop.d22frnw7yy0hnv.amplifyapp.com", "https://dev.yedu-develop.com:8181", "http://localhost:8080", "http://localhost:3000"));

configuration.addAllowedOriginPattern("*");
configuration.addAllowedHeader("*");
configuration.addAllowedMethod("*");
configuration.setAllowCredentials(true);
Expand Down

0 comments on commit e19c4e8

Please sign in to comment.