diff --git a/src/main/java/com/example/mate/common/config/SecurityConfig.java b/src/main/java/com/example/mate/common/config/SecurityConfig.java index 507ef6c8..ccd3bb69 100644 --- a/src/main/java/com/example/mate/common/config/SecurityConfig.java +++ b/src/main/java/com/example/mate/common/config/SecurityConfig.java @@ -1,7 +1,6 @@ package com.example.mate.common.config; import com.example.mate.common.security.filter.JwtCheckFilter; -import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -16,6 +15,8 @@ import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import java.util.List; + @Configuration @EnableWebSecurity @EnableMethodSecurity @@ -45,7 +46,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); - config.setAllowedOrigins(List.of("http://localhost:5173", "http://localhost:8080")); + config.setAllowedOrigins(List.of("http://localhost:5173", "http://localhost:8080", "http://catchmi-web-page.s3-website.ap-northeast-2.amazonaws.com/")); config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH")); config.setAllowedHeaders(List.of("Authorization", "Content-Type", "Cache-Control")); config.setAllowCredentials(true);