Skip to content

Conversation

@chaen-ing
Copy link
Member

@chaen-ing chaen-ing commented Aug 19, 2025

📝 개요

SCRUM-371 Refactor: 추가 도메인 허용을 위한 CORS 설정 업데이트

🛠️ 작업 사항

🔗 관련 이슈 / JIRA

✅ 체크리스트

  • 코드 리뷰 반영 완료
  • 테스트 코드 작성
  • 로컬 테스트 완료
  • 문서 업데이트 필요 시 반영

🙏 기타 사항

추가적으로 리뷰어가 알아야 할 사항 작성

Summary by CodeRabbit

  • Chores
    • 교차 출처 요청 허용 범위를 확장해 https://kkinicong.co.kr 도메인에서도 서비스가 정상 동작합니다. 기존 https://kkinicong.vercel.app 접근은 그대로 유지됩니다. 이로써 새 도메인에서 로그인 및 API 호출 시 발생할 수 있는 접근 차단(CORS) 이슈를 예방하고, 도메인 전환/병행 운영 중 사용자 접근성을 향상합니다.

@chaen-ing chaen-ing requested a review from erika0915 August 19, 2025 05:42
@chaen-ing chaen-ing self-assigned this Aug 19, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 19, 2025

Walkthrough

CORS 허용 오리진 목록에 https://kkinicong.co.kr 가 추가되었고, 기존 https://kkinicong.vercel.app 는 유지되었습니다. 목록 포매팅이 다중 행으로 변경되었으며 주석 한 줄이 제거되었습니다. 메서드 시그니처나 인증/인가 로직 변경은 없습니다.

Changes

Cohort / File(s) Change Summary
CORS 설정 업데이트
src/main/java/com/kkinikong/be/global/config/SecurityConfig.java
corsConfigurationSource에서 allowed origins에 https://kkinicong.co.kr 추가, 기존 https://kkinicong.vercel.app 유지. 목록 포맷 정리 및 주석 제거. 기능 로직 변경 없음.

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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

토끼는 귀를 세우고 고개 끄덕여,
“새 오리진 한 줄, 문을 더 크게 열어!”
프리플라이트 휙—헤더가 살짝 미소 짓네.
vercel과 co.kr, 둘 다 안녕 반가워.
깡총깡총, 요청들도 맘 편히 건너오네.

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/SCRUM-371-CORS-change

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

📥 Commits

Reviewing files that changed from the base of the PR and between f3b7a2c and 2c4a187.

📒 Files selected for processing (1)
  • src/main/java/com/kkinikong/be/global/config/SecurityConfig.java (1 hunks)

@chaen-ing chaen-ing merged commit c273ee4 into develop Aug 19, 2025
2 checks 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.

3 participants