Skip to content

[FIX] 리버스 프록시 환경에서 세션 쿠키 유지를 위한 proxy 설정 추가#46

Merged
Takch02 merged 1 commit into
mainfrom
fix/session-cookie-persistence
May 12, 2026
Merged

[FIX] 리버스 프록시 환경에서 세션 쿠키 유지를 위한 proxy 설정 추가#46
Takch02 merged 1 commit into
mainfrom
fix/session-cookie-persistence

Conversation

@Takch02

@Takch02 Takch02 commented May 12, 2026

Copy link
Copy Markdown
Contributor

[FIX] 리버스 프록시 환경에서 세션 쿠키 유지를 위한 proxy 설정 추가

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 프로덕션 환경에서 역방향 프록시 뒤에서 실행될 때 세션 미들웨어 설정을 개선했습니다.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 12, 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: 24d1dd0e-c020-477a-a1b0-66f61a7eab93

📥 Commits

Reviewing files that changed from the base of the PR and between dbf0965 and 39d072b.

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

📝 Walkthrough

개요

src/main.ts에서 Express 세션 미들웨어 설정에 proxy 플래그 하나를 추가하여 프로덕션 환경에서 리버스 프록시를 통한 요청을 올바르게 처리하도록 구성했습니다.

변경 사항

세션 프록시 신뢰 구성

레이어 / 파일 요약
세션 미들웨어 프록시 옵션 추가
src/main.ts
세션 구성에 proxy: !isLocal 옵션을 추가하여 비개발 환경에서 리버스 프록시 뒤의 클라이언트 IP를 신뢰합니다.

관련 PR

  • K-Statra/backend#17: 동일 파일의 세션 미들웨어 설정을 수정하며, 해당 PR은 쿠키 보안 옵션을 환경별로 조정하는 변경사항을 포함합니다.
  • K-Statra/backend#22: 동일한 isLocal 기반 환경 로직으로 세션 설정을 수정하며, 쿠키 보안/sameSite 속성을 조정합니다.

예상 검토 소요 시간

🎯 1 (매우 간단함) | ⏱️ ~2분

축하 시

프록시 한 줄로 🚀
신뢰의 수로를 열고
프로덕션은 안녕
개발자의 손가락질 없이 ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확하게 반영하고 있습니다. 리버스 프록시 환경에서 세션 쿠키 유지를 위한 proxy 설정 추가라는 내용이 raw_summary의 변경사항과 일치합니다.
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 fix/session-cookie-persistence

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.

@Takch02 Takch02 merged commit 805c0c4 into main May 12, 2026
3 checks passed
@Takch02 Takch02 deleted the fix/session-cookie-persistence branch May 12, 2026 07:20
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