Skip to content

Commit bab2e08

Browse files
authored
Merge pull request #46 from code-review-platform-flow/FLOW-84
feat: order 수정
2 parents 073a1cf + 9d9387f commit bab2e08

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package org.flow.gateway.common.security;
22

33
import java.util.Arrays;
4+
import java.util.Collections;
45

56
import org.springframework.context.annotation.Bean;
67
import org.springframework.context.annotation.Configuration;
7-
import org.springframework.security.config.Customizer;
88
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
99
import org.springframework.security.config.web.server.ServerHttpSecurity;
1010
import org.springframework.security.web.server.SecurityWebFilterChain;
@@ -19,21 +19,21 @@ public class SecurityConfig {
1919
@Bean
2020
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
2121
http
22-
.csrf(ServerHttpSecurity.CsrfSpec::disable) // CSRF 비활성화
23-
.cors(corsSpec -> corsSpec.configurationSource(corsConfigurationSource())) // CORS 설정 추가
22+
.csrf(ServerHttpSecurity.CsrfSpec::disable)
23+
.cors(corsSpec -> corsSpec.configurationSource(corsConfigurationSource()))
2424
.authorizeExchange(exchanges -> exchanges
2525
.anyExchange().permitAll()
2626
)
27-
.formLogin(Customizer.withDefaults())
28-
.httpBasic(Customizer.withDefaults());
27+
.httpBasic(ServerHttpSecurity.HttpBasicSpec::disable)
28+
.formLogin(ServerHttpSecurity.FormLoginSpec::disable);
2929

3030
return http.build();
3131
}
3232

3333
@Bean
3434
public CorsConfigurationSource corsConfigurationSource() {
3535
CorsConfiguration corsConfig = new CorsConfiguration();
36-
corsConfig.setAllowedOrigins(Arrays.asList("http://localhost:3000", "http://your-other-allowed-origin.com"));
36+
corsConfig.setAllowedOrigins(Collections.singletonList("http://localhost:3000"));
3737
corsConfig.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
3838
corsConfig.setAllowedHeaders(Arrays.asList("*"));
3939
corsConfig.setAllowCredentials(true);

0 commit comments

Comments
 (0)