Skip to content

Commit de57f8e

Browse files
feat: cors SecurityConfig 설정 수정
- setAllowedOrigins 여러개 쓰면 마지막 것만 적용됨
1 parent 4b18a5d commit de57f8e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/flow/gateway/common/security/SecurityConfig.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
3737
@Bean
3838
public CorsConfigurationSource corsConfigurationSource() {
3939
CorsConfiguration corsConfig = new CorsConfiguration();
40-
corsConfig.setAllowedOrigins(Collections.singletonList("http://localhost:3000"));
41-
corsConfig.setAllowedOrigins(Collections.singletonList(webAddress));
40+
corsConfig.setAllowedOrigins(Arrays.asList("http://localhost:3000", webAddress));
4241
corsConfig.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
4342
corsConfig.setAllowedHeaders(Arrays.asList("*"));
4443
corsConfig.setAllowCredentials(true);

0 commit comments

Comments
 (0)