Skip to content

[Fix] CORS allow_methods에 PATCH/DELETE 추가#92

Merged
zweadfx merged 1 commit intomainfrom
fix/cors-plans-401
Apr 10, 2026
Merged

[Fix] CORS allow_methods에 PATCH/DELETE 추가#92
zweadfx merged 1 commit intomainfrom
fix/cors-plans-401

Conversation

@zweadfx
Copy link
Copy Markdown
Owner

@zweadfx zweadfx commented Apr 9, 2026

어떤 변경사항인가요?

CORS 미들웨어의 allow_methodsPATCHDELETE가 누락되어 Plans API의 완료 토글 및 삭제 요청이 브라우저에서 차단되던 버그를 수정합니다.

작업 상세 내용

  • src/main.py CORS allow_methodsPATCH, DELETE 추가

체크리스트

  • self-test를 수행하였는가?
  • 관련 문서나 주석을 업데이트하였는가?
  • 설정한 코딩 컨벤션을 준수하였는가?

관련 이슈

리뷰 포인트

  • allow_methods=["*"] 대신 명시적으로 필요한 메서드만 나열하는 방식을 유지했습니다.
  • 현재 API에서 PUT 메서드는 사용하지 않으므로 포함하지 않았습니다.

참고사항 및 스크린샷(선택)

변경 전:

allow_methods=["GET", "POST", "OPTIONS"],

변경 후:

allow_methods=["GET", "POST", "PATCH", "DELETE", "OPTIONS"],

Summary by CodeRabbit

  • Bug Fixes
    • Extended API compatibility by enabling additional HTTP methods (PATCH and DELETE) for cross-origin requests alongside existing GET, POST, and OPTIONS methods.

@zweadfx zweadfx self-assigned this Apr 9, 2026
@zweadfx zweadfx added the bug 발견된 오류나 결함을 수정할 때 사용합니다. label Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c452f378-024c-4129-85b0-1bf031ddef82

📥 Commits

Reviewing files that changed from the base of the PR and between bea59e8 and d95b689.

📒 Files selected for processing (1)
  • src/main.py

📝 Walkthrough

Walkthrough

Updated CORS middleware configuration in src/main.py to include PATCH and DELETE HTTP methods in the allow_methods parameter, expanding the set of permitted cross-origin requests from the previous GET, POST, and OPTIONS only.

Changes

Cohort / File(s) Summary
CORS Configuration
src/main.py
Extended CORS middleware allow_methods to include PATCH and DELETE HTTP verbs alongside existing GET, POST, and OPTIONS.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 A rabbit hops through CORS gates,
With PATCH and DELETE now in place,
No more preflight delays and waits,
The API breathes with wider grace! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding PATCH and DELETE HTTP methods to the CORS allow_methods configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cors-plans-401

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@zweadfx zweadfx merged commit c9bc923 into main Apr 10, 2026
2 checks passed
@zweadfx zweadfx deleted the fix/cors-plans-401 branch April 10, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 발견된 오류나 결함을 수정할 때 사용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant