-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: 프론트 배포주소 추가 #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughCORS 설정 파일이 업데이트되어 허용된 origin 목록에 세 개의 프로덕션 URL이 추가되었습니다. 기존에는 로컬호스트 두 개만 허용되었으나, 이제 프로덕션 도메인 세 개가 추가로 허용됩니다. 그 외의 설정은 변경되지 않았습니다. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/config/security/CorsConfig.java (2)
17-23:setAllowCredentials가 두 번 호출되어 있습니다
Line 17과 Line 22에서 동일한 설정을 반복하고 있습니다. 중복 호출은 동작에는 영향을 주지 않으나 가독성을 떨어뜨리고 유지보수 시 혼란을 줄 수 있습니다. 한 번만 호출하도록 정리해 주세요.- config.setAllowCredentials(true); // 쿠키나 인증헤더 자격증명 허용 ... - config.setAllowCredentials(true); // 쿠키 포함 허용 + config.setAllowCredentials(true); // 쿠키·인증 헤더 자격증명 허용
18-18: 허용 Origin 하드코딩 대신 프로퍼티로 외부화 권장
배포 URL이 늘어날 때마다 소스를 수정·재배포해야 합니다.
application.yml(또는 환경 변수)로 리스트를 주입받아@Value나@ConfigurationProperties로 바인딩하면 운영/스테이징 환경별로 유연하게 관리할 수 있습니다. 또한*.nowait.co.kr과 같이 서브도메인을 포함하려면setAllowedOriginPatterns를 사용하는 편이 더 안전합니다.예시:
@Value("${cors.allowed-origins}") private List<String> allowedOrigins; @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.setAllowedOrigins(allowedOrigins); ... }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/config/security/CorsConfig.java(1 hunks)
작업 요약
프론트 배포주소 추가
Issue Link
#243
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit