-
Notifications
You must be signed in to change notification settings - Fork 1
[SCRUM-371] Refactor: 추가 도메인 허용을 위한 CORS 설정 업데이트 #114
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 허용 오리진 목록에 https://kkinicong.co.kr 가 추가되었고, 기존 https://kkinicong.vercel.app 는 유지되었습니다. 목록 포매팅이 다중 행으로 변경되었으며 주석 한 줄이 제거되었습니다. 메서드 시그니처나 인증/인가 로직 변경은 없습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant B as Browser (https://kkinicong.co.kr)
participant S as API Server
Note over B,S: CORS Preflight
B->>S: OPTIONS /api/...<br/>Origin: https://kkinicong.co.kr
S-->>B: 204 No Content<br/>Access-Control-Allow-Origin: https://kkinicong.co.kr
Note over B,S: Actual Request
B->>S: GET/POST /api/...
S-->>B: 200 OK (CORS headers included)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
🪧 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/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
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 (1)
src/main/java/com/kkinikong/be/global/config/SecurityConfig.java (1)
111-118: 신규 오리진 추가는 합리적입니다. 다만 ‘kkinikong’ vs ‘kkinicong’ 스펠 확인과 서브도메인 범위 고려가 필요합니다.
- 기존 도메인은
kkinikong.store(…kong)인데, 이번에 추가된/유지된 오리진은kkinicong.*(…cong)입니다. 오타인지, 실제로 서로 다른 도메인인지를 확인 부탁드립니다. 오타라면 교정이 필요합니다.- 향후
www.kkinicong.co.kr또는 다른 서브도메인을 사용할 가능성이 있다면, 매번 오리진을 추가하는 대신 패턴 기반 CORS 설정으로 전환하는 것을 권장합니다.allowCredentials(true)설정과 함께도setAllowedOriginPatterns는 안전하게 동작합니다.패턴 기반으로 전환하는 예시(변경 범위: 해당 블록 내):
- configuration.setAllowedOrigins( - Arrays.asList( - "http://localhost:3000", - "http://localhost:8080", - "http://localhost:5173", - "https://kkinikong.store", - "https://kkinicong.vercel.app", - "https://kkinicong.co.kr")); + configuration.setAllowedOriginPatterns( + Arrays.asList( + "http://localhost:3000", + "http://localhost:8080", + "http://localhost:5173", + "https://kkinikong.store", + "https://*.kkinicong.co.kr", + "https://kkinicong.vercel.app"));메모:
- 만약
kkinikong.co.kr이 정식 도메인이라면(…kong), 해당 도메인(및 필요한 경우www서브도메인)도 함께 허용하거나 패턴을https://*.kkinikong.co.kr까지 포함하도록 조정이 필요합니다.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/main/java/com/kkinikong/be/global/config/SecurityConfig.java(1 hunks)
📝 개요
SCRUM-371 Refactor: 추가 도메인 허용을 위한 CORS 설정 업데이트
🛠️ 작업 사항
🔗 관련 이슈 / JIRA
✅ 체크리스트
🙏 기타 사항
추가적으로 리뷰어가 알아야 할 사항 작성
Summary by CodeRabbit