Skip to content

Commit 7e8af8a

Browse files
Merge pull request #62 from code-review-platform-flow/FLOW-200
feat: FLOW_HTTPS_WEB_ADDRESS 환경변수 추가 및 CORS 허용
2 parents e9f0edb + 1a00c21 commit 7e8af8a

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

+3-1
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

+1
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)