Skip to content

Commit 1a00c21

Browse files
feat: FLOW_HTTPS_WEB_ADDRESS 환경변수 추가 및 CORS 허용
1 parent 7d4d115 commit 1a00c21

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class SecurityConfig {
1919

2020
@Value("${FLOW_WEB_ADDRESS}")
2121
private String webAddress;
22+
@Value("${FLOW_HTTPS_WEB_ADDRESS}")
23+
private String httpsWebAddress;
2224

2325
@Bean
2426
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
@@ -37,7 +39,7 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
3739
@Bean
3840
public CorsConfigurationSource corsConfigurationSource() {
3941
CorsConfiguration corsConfig = new CorsConfiguration();
40-
corsConfig.setAllowedOrigins(Arrays.asList("http://localhost:3000", webAddress));
42+
corsConfig.setAllowedOrigins(Arrays.asList("http://localhost:3000", webAddress, httpsWebAddress));
4143
corsConfig.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "PATCH"));
4244
corsConfig.setAllowedHeaders(Arrays.asList("*"));
4345
corsConfig.setAllowCredentials(true);

src/main/resources/application-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ spring:
1414
- http://localhost:3000
1515
- ${FLOW_WEB_ADDRESS}
1616
- ${FLOW_ADMIN_DASHBOARD_ADDRESS}
17+
- ${FLOW_HTTPS_WEB_ADDRESS}
1718
allowedMethods:
1819
- GET
1920
- POST

0 commit comments

Comments
 (0)