Skip to content

Commit

Permalink
fix: 모바일 개발환경 테스트를 위해 CORS 정책에 ngrok 도메인 추가 (#292)
Browse files Browse the repository at this point in the history
* fix: CORS 설정에 ngrok URL 패턴 추가

* fix: CORS 설정에 로컬호스트 https 도메인 추가
  • Loading branch information
uwoobeat authored Feb 7, 2024
1 parent 549dd6a commit 53b1204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("*");
Expand Down

0 comments on commit 53b1204

Please sign in to comment.