-
Notifications
You must be signed in to change notification settings - Fork 1
[HOTFIX-#169] - nginx 설정에서 HTTP/2 프로토콜로 변경 및 프록시 헤더 추가 #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,12 +44,13 @@ http { | |
|
|
||
| location / { | ||
| proxy_pass http://next-server/; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Upgrade $http_upgrade; | ||
| proxy_set_header Connection 'upgrade'; | ||
| proxy_http_version 2.0; | ||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_cache_bypass $http_upgrade; | ||
| 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; | ||
| } | ||
|
Comment on lines
45
to
54
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WebSocket 지원에 필요한 |
||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proxy_http_version을2.0으로 설정하면 프록시 대상인 업스트림 서버(next-server)가 HTTP/2를 지원해야 합니다. 현재client:3000으로 설정된 Next.js 애플리케이션은 기본적으로 HTTP/1.1만 지원하므로, 이 설정은 연결 오류를 유발할 수 있습니다. 업스트림 서버가 HTTP/2를 지원하는지 확인하고, 그렇지 않다면1.1로 되돌리는 것이 안전합니다.