Skip to content

Commit 4bf7878

Browse files
committed
hotfix
1 parent 4ab5414 commit 4bf7878

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

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

33
import java.util.Arrays;
4-
import java.util.Collections;
54

65
import org.springframework.beans.factory.annotation.Value;
76
import org.springframework.context.annotation.Bean;
@@ -22,6 +21,9 @@ public class SecurityConfig {
2221
@Value("${FLOW_HTTPS_WEB_ADDRESS}")
2322
private String httpsWebAddress;
2423

24+
@Value("${FLOW_ADMIN_DASHBOARD_ADDRESS}")
25+
private String flowAdminDashboardAddress;
26+
2527
@Bean
2628
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
2729
http
@@ -39,7 +41,8 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
3941
@Bean
4042
public CorsConfigurationSource corsConfigurationSource() {
4143
CorsConfiguration corsConfig = new CorsConfiguration();
42-
corsConfig.setAllowedOrigins(Arrays.asList("http://localhost:3000", webAddress, httpsWebAddress));
44+
corsConfig.setAllowedOrigins(
45+
Arrays.asList("http://localhost:3000", webAddress, httpsWebAddress, flowAdminDashboardAddress));
4346
corsConfig.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "PATCH"));
4447
corsConfig.setAllowedHeaders(Arrays.asList("*"));
4548
corsConfig.setAllowCredentials(true);

0 commit comments

Comments
 (0)