Skip to content

[deploy] 운영 서버 배포#207

Merged
buzz0331 merged 1 commit intomainfrom
develop
Aug 12, 2025
Merged

[deploy] 운영 서버 배포#207
buzz0331 merged 1 commit intomainfrom
develop

Conversation

@buzz0331
Copy link
Contributor

@buzz0331 buzz0331 commented Aug 12, 2025

#️⃣ 연관된 이슈

closes #이슈번호

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

📸 스크린샷

💬 리뷰 요구사항

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

📌 PR 진행 시 이러한 점들을 참고해 주세요

* P1 : 꼭 반영해 주세요 (Request Changes) - 이슈가 발생하거나 취약점이 발견되는 케이스 등
* P2 : 반영을 적극적으로 고려해 주시면 좋을 것 같아요 (Comment)
* P3 : 이런 방법도 있을 것 같아요~ 등의 사소한 의견입니다 (Chore)

Summary by CodeRabbit

  • 신규 기능: 없음
  • 버그 수정
    • HTTPS 리다이렉트 시 쿠키 도메인이 리다이렉트 대상 도메인과 동적으로 일치하도록 개선하여 서브도메인 간(OAuth2) 로그인 유지 문제를 해결.
    • 비HTTPS 환경에서는 기존대로 localhost 도메인 사용을 유지해 로컬 개발 로그인 동작 안정화.
    • HTTPS URL 처리에서 강제된 "www" 접두 의존성을 제거해 다양한 도메인 구성(thip.co.kr, www.thip.co.kr 등)에서 일관된 인증 쿠키 동작 보장.

@buzz0331 buzz0331 self-assigned this Aug 12, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

HTTPS 접두어 상수를 "https://www"에서 "https://"로 변경하고, OAuth2 인증 성공 시 토큰 쿠키의 도메인을 리다이렉트 URL 기반으로 동적으로 설정하도록 수정했습니다. 기타 로직과 시그니처는 변경되지 않았습니다.

Changes

Cohort / File(s) Summary
상수 변경
src/main/java/konkuk/thip/common/security/constant/AuthParameters.java
HTTPS_PREFIX"https://www""https://"로 수정
OAuth2 성공 핸들러 (쿠키 도메인 수정)
src/main/java/konkuk/thip/common/security/oauth2/CustomSuccessHandler.java
HTTPS 리다이렉트인 경우 쿠키 도메인을 고정값 .thip.co.kr에서 webRedirectUrl.replace(HTTPS_PREFIX.getValue(), "")로 동적 계산하도록 변경; 비-HTTPS는 localhost 유지

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Server as Auth Server
    participant Browser

    User->>Server: OAuth2 인증 완료
    Server->>Server: onAuthenticationSuccess()
    Server->>Server: addTokenCookie(webRedirectUrl)
    alt HTTPS 리다이렉트
        Server->>Server: domain = webRedirectUrl.replace("https://", "")
        Server-->>Browser: Set-Cookie (Secure=true, Domain=동적)
    else 비-HTTPS
        Server-->>Browser: Set-Cookie (Secure=false, Domain=localhost)
    end
    Server-->>Browser: 302 Redirect to webRedirectUrl
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested labels

🌈 infra

Suggested reviewers

  • seongjunnoh

Poem

토끼가 말하네, HTTPS만 챙기자 🐇
쓸데없는 www는 벗겨내고, 깔끔히 가자.
쿠키는 주소에서 딱 뽑아, 동적으로 착!
로컬이면 편히 쉬고, 보안이면 단단히 꽉!
깡총깡총 배포길, 오늘도 안전히 ✨


📜 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 ec8be49 and 83160d8.

📒 Files selected for processing (2)
  • src/main/java/konkuk/thip/common/security/constant/AuthParameters.java (1 hunks)
  • src/main/java/konkuk/thip/common/security/oauth2/CustomSuccessHandler.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

🪧 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.

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

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.

@buzz0331 buzz0331 merged commit a99cb67 into main Aug 12, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant