Skip to content

Conversation

@CSE-Shaco
Copy link
Contributor

@CSE-Shaco CSE-Shaco commented Oct 21, 2025

📌 연관된 이슈

ex) #이슈번호, #이슈번호

✨ 작업 내용

Fix: CORS 설정 수정 및 프리플라이트 요청 오류 해결

💬 리뷰 요구사항(선택)

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 보안 필터 구성 순서 최적화
  • 개선사항

    • CORS 설정 확대로 추가 도메인 지원
    • 인증 및 쿠키 관련 헤더 노출 구성 추가
    • Preflight 요청 캐싱 시간 설정으로 성능 개선

- setAllowedOriginPatterns로 변경하여 서브도메인 허용 개선
- api.gdgocinha.com 등 명시적 Origin 추가
- OPTIONS 요청 허용 및 CORS 응답 일관성 강화
- HTTPS 리다이렉트 환경에서 발생하던 CORS 오류 수정
@CSE-Shaco CSE-Shaco merged commit 0b4f29c into GDGoCINHA:develop Oct 21, 2025
1 check passed
@coderabbitai
Copy link

coderabbitai bot commented Oct 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

SecurityConfig.java의 보안 설정이 재구성되었습니다. CSRF 필터 호출 순서가 CORS 뒤로 이동했으며, CORS 설정에서 허용 오리진이 확장되고(api.gdgocinha.com, 와일드카드 서브도메인), Authorization 및 Set-Cookie 헤더가 노출되었고, preflight 요청의 max-age가 활성화되었습니다.

Changes

Cohort / File(s) 변경 요약
보안 필터 체인 재구성
src/main/java/inha/gdgoc/global/security/SecurityConfig.java
csrf() 필터 호출을 cors() 이후로 재순서화; corsConfigurationSource에서 허용 오리진 확장 (api.gdgocinha.com, 와일드카드 서브도메인 추가); 노출 헤더 추가 (Authorization, Set-Cookie); preflight 캐시 max-age 활성화 (3600초); 기존 allow-credentials 설정 유지

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 분

Possibly related PRs

Suggested labels

bug

Poem

🐰 CORS의 문을 열고, 보안은 더욱 탄탄하게,
오리진들을 환영하며, 쿠키는 안전하게,
필터의 순서를 맞춰, 요청을 바르게,
캐시도 설정하여, preflight는 빠르게!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6c0dc3 and 27c4f66.

📒 Files selected for processing (1)
  • src/main/java/inha/gdgoc/global/security/SecurityConfig.java (2 hunks)

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.

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.

1 participant