Skip to content

Fix: 로컬 개발 환경 CORS 허용 origin 추가#238

Merged
mayrang merged 1 commit intodevelopfrom
fix/add-localhost-cors-origin
Mar 20, 2026
Merged

Fix: 로컬 개발 환경 CORS 허용 origin 추가#238
mayrang merged 1 commit intodevelopfrom
fix/add-localhost-cors-origin

Conversation

@mayrang
Copy link
Copy Markdown
Contributor

@mayrang mayrang commented Mar 20, 2026

변경 내용

SecurityConfig.javacorsConfigurationSource()에 로컬 개발 환경 origin을 추가했습니다.

문제

Spring Security의 CORS 설정(SecurityConfig)이 WebMvcConfig의 CORS 설정을 덮어씁니다.
SecurityConfigallowedOriginslocalhost가 없어서 로컬 개발 중 모든 API 요청이 403으로 차단되었습니다.

수정

List<String> allowedOrigins = List.of(
    "https://release-back.vercel.app",
    "https://www.moing.shop",
    "https://www.moing.io",
    "https://www.alpha.moing.io",
    "http://localhost:8080"   // 추가
);

@mayrang mayrang merged commit 77c54fa into develop Mar 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant