|
29 | 29 | @RequiredArgsConstructor |
30 | 30 | public class SecurityConfig { |
31 | 31 |
|
32 | | - @Value("#{'${cors.allowed-origins}'.split(',')}") |
33 | | - private String[] allowedOrigins; |
| 32 | + //@Value("#{'${cors.allowed-origins}'.split(',')}") |
| 33 | + //private String[] allowedOrigins; |
34 | 34 |
|
35 | 35 | private final JwtAuthenticationFilter jwtAuthenticationFilter; |
36 | 36 | private final CustomOAuth2UserService customOAuth2UserService; |
@@ -82,7 +82,11 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti |
82 | 82 | public CorsConfigurationSource corsConfigurationSource() { |
83 | 83 | CorsConfiguration configuration = new CorsConfiguration(); |
84 | 84 |
|
85 | | - configuration.setAllowedOrigins(Arrays.asList(allowedOrigins)); |
| 85 | + //configuration.setAllowedOrigins(Arrays.asList(allowedOrigins)); |
| 86 | + configuration.setAllowedOrigins(Arrays.asList( |
| 87 | + "http://localhost:3000", "http://localhost:5173", "http://localhost:8080", |
| 88 | + "http://wedit.site", "https://wedit.site", "http://43.201.85.194:5173")); |
| 89 | + configuration.setAllowedOriginPatterns(Arrays.asList("*")); |
86 | 90 | configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PATCH", "DELETE")); |
87 | 91 | configuration.setAllowedHeaders(Arrays.asList("*")); |
88 | 92 | configuration.setExposedHeaders(Arrays.asList("Content-Type", "Authorization", "Authorization-refresh", "accept")); |
|
0 commit comments