Skip to content

[Bugfix#211] 개발환경 refreshToken 쿠키 저장 안 되는 문제 해결 - #212

Merged
Seojegyeong merged 1 commit into
developfrom
bugfix/#221
May 15, 2026
Merged

Seojegyeong merged 1 commit into
developfrom
bugfix/#221

Conversation

@Seojegyeong

@Seojegyeong Seojegyeong commented May 14, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

#211

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

문제 원인

  • 서버가 로그인 응답으로 Set-Cookie: refreshToken=xxx; Domain=whereyouad.com 이런 식의 쿠키를 보냄.
  • 개발 환경에서는 브라우저가 localhost에서 응답을 받는데, 쿠키에는 whereyouad.com이라고 되어있어 개발 환경에서 저장을 거부한다.

배포 환경에서는 동작하는 이유

  • 배포환경에서는 브라우저가 whereyouad.com 에서 직접 응답을 받으니까 Domain=whereyouad.com 쿠키를 정상 저장한다.

해결책

vite.config.ts 프록시 설정에 추가: cookieDomainRewrite: { "*": "" }

  • 도메인 속성을 제거하여 브라우저는 현재 호스트인 localhost 소속 쿠키로 저장될 수 있도록 함
  • 배포 환경에서는 cookieDomainRewrite가 적용되지 않음
    • 배포 환경에서는 프록시 없이 백엔드가 직접 소통하니까 서버 원본 응답 그대로 받음

😅 미완성 작업

N/A

📢 논의 사항 및 참고 사항

N/A

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

스타일

  • 스타일
    • 캠페인 상세 페이지의 제목 텍스트 줄바꿈이 개선되었습니다.

Review Change Stack

@Seojegyeong
Seojegyeong requested review from YermIm and jjjsun May 14, 2026 14:29
@Seojegyeong Seojegyeong self-assigned this May 14, 2026
@Seojegyeong Seojegyeong added the 🐞 BugFix Something isn't working label May 14, 2026
@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
where-you-ad Ready Ready Preview, Comment May 14, 2026 2:29pm

@Seojegyeong Seojegyeong changed the title [Bugfix#211] cookieDomainRewrite 옵션 추가로 개발 환경 로그인 유지 [Bugfix#211] 개발환경 refreshToken 쿠키 저장 안 되는 문제 해결 May 14, 2026
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2c137ec5-2e2e-48cb-9a4d-7494bf412f9e

📥 Commits

Reviewing files that changed from the base of the PR and between ae2764e and c6d25ac.

⛔ Files ignored due to path filters (1)
  • vite.config.ts is excluded by none and included by none
📒 Files selected for processing (1)
  • src/pages/ads/list/CampaignDetail.tsx

📝 Walkthrough

전체 요약

캠페인 상세 페이지(CampaignDetail 컴포넌트)에서 제목의 CSS 유틸리티 클래스를 break-words에서 wrap-break-word로 변경했습니다. 긴 캠페인 제목의 줄바꿈 처리를 개선하는 스타일 조정입니다.

변경 사항

캠페인 상세 페이지 타이틀 스타일 업데이트

레이어 / 파일(들) 요약
캠페인 제목 줄바꿈 스타일 변경
src/pages/ads/list/CampaignDetail.tsx
캠페인 제목 <h1>의 CSS 유틸 클래스가 break-words에서 wrap-break-word로 변경되어 텍스트 줄바꿈 방식을 개선합니다.

검수 소견

이 변경은 UI 스타일 관련된 간단한 클래스 변경입니다. 다음 부분을 확인하면 좋겠습니다:

  • 스타일 일관성: 프로젝트에서 사용하는 Tailwind CSS나 커스텀 유틸리티 중 wrap-break-word 클래스가 실제로 정의되어 있는지, 그리고 의도대로 동작하는지 확인
  • 브라우저 호환성: break-word 또는 관련 CSS 속성의 브라우저 지원 범위가 충분한지 검토
  • 다른 요소 검토: 같은 패턴으로 긴 텍스트를 다루는 다른 제목이나 텍스트 요소들도 동일한 처리가 필요한지 고려

🎯 1 (Trivial) | ⏱️ ~3 분

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning PR 제목이 실제 변경사항과 불일치합니다. 제목은 refreshToken 쿠키 저장 문제 해결을 언급하지만, 실제 변경사항은 CampaignDetail 컴포넌트의 CSS 클래스명 변경(break-words → wrap-break-word)입니다. PR 제목을 실제 변경사항을 정확히 반영하도록 수정하세요. 예: '[Bugfix] CampaignDetail 캠페인 제목 텍스트 줄바꿈 스타일 수정' 또는 실제 목표가 refreshToken이라면 변경사항과 일치하는 파일 수정이 필요합니다.
Description check ⚠️ Warning PR 설명이 refreshToken 쿠키 문제 해결에 대해 상세히 작성되어 있으나, 실제 파일 변경사항(CampaignDetail.tsx의 CSS 클래스명 변경)과는 전혀 무관합니다. 설명과 코드 변경이 일치하지 않습니다. PR 설명을 vite.config.ts 변경사항으로 수정하거나, 실제 변경된 파일(CampaignDetail.tsx)에 맞는 설명으로 수정하세요. 설명과 코드 변경사항이 일치해야 합니다.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 bugfix/#221

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.

@github-actions

Copy link
Copy Markdown

📚 Storybook 배포 완료

항목 링크
📖 Storybook https://69a147b60a56365d9e2185ef-mnafzfeucj.chromatic.com/
🔍 Chromatic https://www.chromatic.com/build?appId=69a147b60a56365d9e2185ef&number=277

@jjjsun jjjsun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P4: 확인했습니다!

@Seojegyeong
Seojegyeong merged commit 7525ecb into develop May 15, 2026
4 checks passed
@Seojegyeong
Seojegyeong deleted the bugfix/#221 branch May 15, 2026 12:47
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.

🐞 [BugFix] 개발 환경에서 새로고침 시 refreshToken 쿠키 미전송으로 인한 reissue 401 오류

3 participants