Skip to content

Fix: [BADA-360] Cors 에러 해결#384

Merged
choyunju merged 1 commit intodevelopfrom
fix/BADA-360-fix-cors
Aug 4, 2025
Merged

Fix: [BADA-360] Cors 에러 해결#384
choyunju merged 1 commit intodevelopfrom
fix/BADA-360-fix-cors

Conversation

@choyunju
Copy link
Copy Markdown
Contributor

@choyunju choyunju commented Aug 4, 2025

#️⃣연관된 이슈

close: #383

🚀 작업 내용

  • CORS 에러 해결

🔍 리뷰 요청 사항

@choyunju choyunju self-assigned this Aug 4, 2025
@choyunju choyunju added the 🐞 BugFix Something isn't working label Aug 4, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 4, 2025

Failed to generate code suggestions for PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 4, 2025

Walkthrough

WebConfig 클래스의 CORS 설정이 수정되어 허용된 오리진 목록에 "https://api.badata.store"가 추가되었습니다. 이 변경 외에 메서드, 헤더, 인증 관련 설정에는 변동이 없습니다.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/BADA-360-fix-cors

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.

❤️ Share
🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
  • 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 src/utils.ts and explain its main purpose.
    • @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 comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • 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
Copy Markdown

@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/TwoSeaU/BaData/global/config/WebConfig.java (1)

15-15: 주석이 현재 구현과 어긋남
allowedMethods("*")는 이미 모든 HTTP 메서드를 포함하므로 “+ DELETE 추가”라는 주석은 과거 상황을 반영한 것으로 보입니다. 혼동을 줄이기 위해 주석을 갱신하거나 제거해 주세요.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8450fef and 8a49a9c.

📒 Files selected for processing (1)
  • src/main/java/com/TwoSeaU/BaData/global/config/WebConfig.java (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: choyunju
PR: Ureca-Final-Project-Team2/be_badata#132
File: src/main/java/com/TwoSeaU/BaData/domain/user/dto/response/GetFollowsResponse.java:25-25
Timestamp: 2025-07-17T13:03:43.601Z
Learning: choyunju prefers intuitive field naming in DTOs - even if the API response could use generic names like "username", they prefer to use descriptive field names like "nickname" that clearly indicate the actual data being returned for better code clarity and maintainability.
Learnt from: choyunju
PR: Ureca-Final-Project-Team2/be_badata#267
File: src/main/java/com/TwoSeaU/BaData/domain/user/controller/UserController.java:151-154
Timestamp: 2025-07-28T01:13:39.883Z
Learning: choyunju는 프론트엔드에서 토글 형식으로 구현된 Boolean 파라미터의 경우, null 값이 들어올 수 없다고 판단하여 별도의 null 검증 로직을 추가하지 않는 것을 선호한다. 프론트엔드와 백엔드 간의 계약이 명확할 때 중복 검증을 피하는 설계 접근법을 취한다.
🔇 Additional comments (1)
src/main/java/com/TwoSeaU/BaData/global/config/WebConfig.java (1)

14-14: 새 오리진 https://api.badata.store 추가로 CORS 문제 해결 가능
프론트엔드 요청 도메인의 정확한 추가만으로 목적을 달성했으며, allowCredentials(true) 설정과도 충돌이 없습니다.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 4, 2025

Overall Project 17.78%

There is no coverage information present for the Files changed

@choyunju choyunju merged commit 124673c into develop Aug 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BADA-360] [BUG] CORS 오류 해결

2 participants