diff --git a/src/main/java/com/depromeet/global/common/constants/UrlConstants.java b/src/main/java/com/depromeet/global/common/constants/UrlConstants.java index 501277f99..eefb6fb6d 100644 --- a/src/main/java/com/depromeet/global/common/constants/UrlConstants.java +++ b/src/main/java/com/depromeet/global/common/constants/UrlConstants.java @@ -13,6 +13,9 @@ public enum UrlConstants { PROD_DOMAIN_URL("https://www.10mm.today"), DEV_DOMAIN_URL("https://www.dev.10mm.today"), LOCAL_DOMAIN_URL("http://localhost:3000"), + LOCAL_SECURE_DOMAIN_URL("https://localhost:3000"), + + NGROK_DOMAIN_URL("https://*.ngrok-free.app"), IMAGE_DOMAIN_URL("https://image.10mm.today"), ; diff --git a/src/main/java/com/depromeet/global/config/security/WebSecurityConfig.java b/src/main/java/com/depromeet/global/config/security/WebSecurityConfig.java index b149a7118..49aa28b35 100644 --- a/src/main/java/com/depromeet/global/config/security/WebSecurityConfig.java +++ b/src/main/java/com/depromeet/global/config/security/WebSecurityConfig.java @@ -126,6 +126,8 @@ public CorsConfigurationSource corsConfigurationSource() { if (springEnvironmentUtil.isDevProfile()) { configuration.addAllowedOriginPattern(UrlConstants.DEV_DOMAIN_URL.getValue()); configuration.addAllowedOriginPattern(UrlConstants.LOCAL_DOMAIN_URL.getValue()); + configuration.addAllowedOriginPattern(UrlConstants.LOCAL_SECURE_DOMAIN_URL.getValue()); + configuration.addAllowedOriginPattern(UrlConstants.NGROK_DOMAIN_URL.getValue()); } configuration.addAllowedHeader("*");