[HOTFIX] 리다이랙트 url 변경 - #177
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughCORS 허용 origin과 OAuth 운영 리다이렉트 URI를 환경 변수 및 허용 목록에 반영했다. OAuth 서비스는 사용자 지정 URL, 설정값, 허용 목록, localhost 순서로 기준 URL을 선택한다. ChangesOAuth 및 웹 출처 설정
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src/main/java/com/mr/domain/auth/service/OAuthClientService.java (1)
321-332: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win리다이렉트 선택 순서를 단위 테스트로 고정하세요.
resolveFrontendRedirectBaseUrl는 사용자 지정 URI,frontendRedirectUri, 허용 목록 첫 항목, localhost 순서로 동작합니다.OAuthClientServiceTest에 다음 경우를 추가하세요.
- 허용된 사용자 지정 URI의 trim
- 거부된 사용자 지정 URI의 fallback
- 설정 URI가 없는 경우의 fallback
- 성공 및 오류 리다이렉트가 같은 기준 URL을 사용하는지 여부
buildFrontendRedirectUrl과buildFrontendErrorRedirectUrl를 통해 테스트하면 private 메서드에 결합되지 않습니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/java/com/mr/domain/auth/service/OAuthClientService.java` around lines 321 - 332, OAuthClientServiceTest에 buildFrontendRedirectUrl 및 buildFrontendErrorRedirectUrl를 사용한 단위 테스트를 추가해 resolveFrontendRedirectBaseUrl의 선택 순서를 고정하세요: 허용된 사용자 지정 URI는 trim하고, 거부된 URI는 설정 URI로 fallback하며, 설정 URI가 없으면 허용 목록 첫 항목과 localhost 순서로 fallback하고, 성공·오류 리다이렉트가 동일한 기준 URL을 사용하는지 검증하세요.src/main/resources/application.yml (1)
50-54: 🗄️ Data Integrity & Integration | 🔵 Trivial배포 환경 변수와 CORS fallback을 함께 갱신하세요.
YAML의
CORS_ALLOWED_ORIGINS와OAUTH_FRONTEND_REDIRECT_URI기본값은 해당 환경 변수가 없을 때만 사용됩니다. 배포 환경에 기존 값이 있으면 새 운영 도메인이 반영되지 않습니다.또한
SecurityConfig의 별도 fallback에는https://musereview-sigma.vercel.app이 남아 있고 새 운영 origin은 없습니다.OAuthProperties는 환경 변수의OAUTH_FRONTEND_REDIRECT_URI도 허용 목록에 추가하므로, 오래된 환경 변수가 남으면 이전 URI가 계속 유효합니다.배포 변수와
SecurityConfigfallback의 실제 값을 갱신하고, Spring Boot 외부 설정 우선순위에 따라 유효한 설정을 확인하세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/resources/application.yml` around lines 50 - 54, 배포 환경 변수의 CORS_ALLOWED_ORIGINS와 OAUTH_FRONTEND_REDIRECT_URI 값을 새 운영 도메인 기준으로 갱신하고, application.yml의 fallback도 동일하게 맞추세요. SecurityConfig의 별도 CORS fallback에서 기존 Vercel origin을 제거하고 새 운영 origin을 추가하며, OAuthProperties의 허용 목록에는 환경 변수로 지정된 OAUTH_FRONTEND_REDIRECT_URI도 반영되도록 확인하세요. Spring Boot 외부 설정이 application.yml fallback보다 우선하므로 실제 배포 변수에도 변경된 값이 적용되는지 검증하세요.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/resources/application.yml`:
- Line 50: application.yml의 allowed-origins fallback을 SecurityConfig의 최신 허용
origin 목록과 동일하게 갱신하세요. 설정 파일을 읽지 못하는 경우에도 새 운영 origin은 허용되고 제거된 이전 Vercel
origin은 거부되도록 두 설정의 허용 목록을 동기화하세요.
- Around line 50-58: Align CORS origins with the OAuth frontend redirect URI
allowlist in src/main/resources/application.yml lines 50-58 and
MR_config/local/application.example.yml lines 50-58: because localhost:3000 is
currently allowed by CORS, add its /oauth/callback URI to
oauth.frontend-redirect-uris in both files, or remove localhost:3000 from
allowed-origins if that port is unsupported.
---
Nitpick comments:
In `@src/main/java/com/mr/domain/auth/service/OAuthClientService.java`:
- Around line 321-332: OAuthClientServiceTest에 buildFrontendRedirectUrl 및
buildFrontendErrorRedirectUrl를 사용한 단위 테스트를 추가해 resolveFrontendRedirectBaseUrl의
선택 순서를 고정하세요: 허용된 사용자 지정 URI는 trim하고, 거부된 URI는 설정 URI로 fallback하며, 설정 URI가 없으면
허용 목록 첫 항목과 localhost 순서로 fallback하고, 성공·오류 리다이렉트가 동일한 기준 URL을 사용하는지 검증하세요.
In `@src/main/resources/application.yml`:
- Around line 50-54: 배포 환경 변수의 CORS_ALLOWED_ORIGINS와 OAUTH_FRONTEND_REDIRECT_URI
값을 새 운영 도메인 기준으로 갱신하고, application.yml의 fallback도 동일하게 맞추세요. SecurityConfig의 별도
CORS fallback에서 기존 Vercel origin을 제거하고 새 운영 origin을 추가하며, OAuthProperties의 허용
목록에는 환경 변수로 지정된 OAUTH_FRONTEND_REDIRECT_URI도 반영되도록 확인하세요. Spring Boot 외부 설정이
application.yml fallback보다 우선하므로 실제 배포 변수에도 변경된 값이 적용되는지 검증하세요.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b91ccf7e-a5ec-4630-a3ae-93f9658ba70d
📒 Files selected for processing (3)
MR_config/local/application.example.ymlsrc/main/java/com/mr/domain/auth/service/OAuthClientService.javasrc/main/resources/application.yml
on1yoneprivate
left a comment
There was a problem hiding this comment.
변경 사항 확인했습니다! 수고하셨어요
📍 개요
⛓️💥 관련 이슈
🛠️ 작업 내용
✅ 체크리스트
📎 참고 사항
Summary by CodeRabbit
새 기능
개선