Skip to content

Dev Branch Prod hotfix 사항 반영#173

Merged
alsgud8311 merged 6 commits intodevelopmentfrom
main
Sep 22, 2025
Merged

Dev Branch Prod hotfix 사항 반영#173
alsgud8311 merged 6 commits intodevelopmentfrom
main

Conversation

@alsgud8311
Copy link
Contributor

prod 브랜치에서 분기하여 추가된 hotfix 반영사항을 dev branch에서도 반영하기 위한 pr입니다.

@gemini-code-assist

This comment was marked as resolved.

@alsgud8311 alsgud8311 merged commit 5de78e7 into development Sep 22, 2025
8 checks passed
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 nginx.prod.conf 설정을 변경하여 WebSocket을 지원하도록 수정하고 HTTP/2를 비활성화하는 핫픽스를 적용하는 것으로 보입니다. 이러한 변경은 의도된 것으로 이해됩니다. 하지만 이 과정에서 백엔드 애플리케이션에 중요한 X-Forwarded-ForX-Forwarded-Proto 헤더가 제거된 것으로 보입니다. 이 헤더들은 클라이언트의 실제 IP 주소와 프로토콜을 백엔드로 전달하는 데 필수적이므로, 다시 추가하는 것을 강력히 권장합니다. 이 문제를 해결하기 위한 구체적인 코드 제안을 포함한 리뷰 의견을 남겼습니다.

Comment on lines +47 to +52
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_cache_bypass $http_upgrade;
Copy link
Contributor

Choose a reason for hiding this comment

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

high

WebSocket 지원을 위한 헤더를 추가하면서 X-Forwarded-ForX-Forwarded-Proto 헤더가 제거되었습니다. 이 헤더들은 백엔드 애플리케이션(Next.js)이 클라이언트의 실제 IP 주소와 원래 요청 프로토콜(HTTPS)을 파악하는 데 매우 중요합니다.

  • X-Forwarded-For: 이 헤더가 없으면 백엔드에서 클라이언트 IP를 알 수 없어 로깅, 보안(예: IP 기반 접근 제어) 등에서 문제가 발생할 수 있습니다. 특히, nginx.conf 파일의 42번째 줄에 real_ip_header X-Forwarded-For;가 설정되어 있고, 56번째 줄의 로그 포맷에서도 $http_x_forwarded_for를 사용하고 있어 이 헤더는 필수적입니다.
  • X-Forwarded-Proto: 이 헤더는 백엔드가 리디렉션이나 URL 생성 시 올바른 프로토콜(https)을 사용하도록 보장합니다.

아래와 같이 해당 헤더들을 다시 추가하는 것을 권장합니다.

            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection 'upgrade';
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $scheme;
            proxy_cache_bypass $http_upgrade;

@github-actions
Copy link

🛠️ Build Summary

Status: ✅ SUCCESS
Duration: 57초
Exit Code: 0
Commit: 59876a1

📋 Build Output (마지막 45줄)

   Generating static pages (2/4) 
   Generating static pages (3/4) 
 ✓ Generating static pages (4/4)
   Finalizing page optimization ...
   Collecting build traces ...

Route (pages)                                 Size  First Load JS
┌ ƒ /                                      77.4 kB         639 kB
├   /_app                                      0 B         308 kB
├ ○ /404 (1366 ms)                         1.78 kB         312 kB
├ ○ /500 (1363 ms)                           757 B         309 kB
├ ƒ /api/auth/logout                           0 B         308 kB
├ ƒ /dashboard                             14.6 kB         634 kB
├ ƒ /interviews                            7.56 kB         346 kB
├ ƒ /interviews/[interviewId]              11.5 kB         604 kB
├ ƒ /interviews/[interviewId]/result       5.19 kB         363 kB
├ ○ /layout (1363 ms)                        541 B         309 kB
├   └ css/2af4d3721e97fa9b.css               280 B
├ ƒ /login                                  2.6 kB         313 kB
├ ƒ /login/callback                           2 kB         333 kB
├ ƒ /login/google/callback                    2 kB         333 kB
├ ƒ /login/profile                         11.3 kB         366 kB
├ ƒ /members/[memberId]                    3.63 kB         339 kB
├ ƒ /members/interviews/[interviewId]      6.84 kB         338 kB
├ ƒ /purchase                              6.39 kB         627 kB
├ ƒ /purchase/confirm                      1.76 kB         333 kB
├ ○ /purchase/error (1363 ms)                804 B         311 kB
├ ƒ /terms/privacy                         5.08 kB         337 kB
└ ƒ /terms/termsofuse                      4.48 kB         336 kB
+ First Load JS shared by all               323 kB
  ├ chunks/framework-962931b100bb889b.js   57.6 kB
  ├ chunks/main-daadd508103bf5a4.js         176 kB
  ├ chunks/pages/_app-0e244b3719a8da89.js  72.8 kB
  ├ css/d679a26ab67d1f1c.css               15.1 kB
  └ other shared chunks (total)            1.89 kB

ƒ Middleware                               96.7 kB

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

   Memory usage report:
    - Total time spent in GC: 375.95ms
    - Peak heap usage: 68.43 MB
    - Peak RSS usage: 690.39 MB

🤖 Generated by GitHub Actions at Mon Sep 22 03:48:30 UTC 2025

@github-actions
Copy link

🚀 Lighthouse Report for TEST1

📅 Date: 9/22/2025

Category Score
🔴 Performance 18
🟢 Accessibility 96
🟢 Best Practices 96
🟢 SEO 100

📊 Performance Details

Metric Score Value
🟢 First Contentful Paint 99 1.1 s
🔴 Largest Contentful Paint 6 6.9 s
🔴 Cumulative Layout Shift 15 0.518

🚀 Lighthouse Report for TEST2

📅 Date: 9/22/2025

Category Score
🔴 Performance 25
🟢 Accessibility 96
🟢 Best Practices 96
🟢 SEO 100

📊 Performance Details

Metric Score Value
🟢 First Contentful Paint 100 0.9 s
🔴 Largest Contentful Paint 16 5.7 s
🔴 Cumulative Layout Shift 15 0.518

🚀 Lighthouse Report for TEST3

📅 Date: 9/22/2025

Category Score
🔴 Performance 27
🟢 Accessibility 96
🟢 Best Practices 96
🟢 SEO 100

📊 Performance Details

Metric Score Value
🟢 First Contentful Paint 100 0.9 s
🔴 Largest Contentful Paint 21 5.4 s
🔴 Cumulative Layout Shift 15 0.518

🚀 Lighthouse Report for TEST4

📅 Date: 9/22/2025

Category Score
🔴 Performance 26
🟢 Accessibility 96
🟢 Best Practices 96
🟢 SEO 100

📊 Performance Details

Metric Score Value
🟢 First Contentful Paint 100 0.9 s
🔴 Largest Contentful Paint 18 5.6 s
🔴 Cumulative Layout Shift 15 0.518

🚀 Lighthouse Report for TEST5

📅 Date: 9/22/2025

Category Score
🔴 Performance 26
🟢 Accessibility 96
🟢 Best Practices 96
🟢 SEO 100

📊 Performance Details

Metric Score Value
🟢 First Contentful Paint 100 0.9 s
🔴 Largest Contentful Paint 18 5.5 s
🔴 Cumulative Layout Shift 15 0.518

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