-
-
Notifications
You must be signed in to change notification settings - Fork 18
fix: disable nginx proxy buffering to enable AI streaming responses #1600
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 | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,7 +18,11 @@ server { | |||||||
| add_header referrer-policy 'strict-origin-when-cross-origin'; | ||||||||
| } | ||||||||
| location /api/ { | ||||||||
| proxy_pass http://localhost:3000/; | ||||||||
| proxy_set_header Host $host; | ||||||||
| proxy_pass http://localhost:3000/; | ||||||||
| proxy_set_header Host $host; | ||||||||
| proxy_http_version 1.1; | ||||||||
| proxy_set_header Connection ''; | ||||||||
| proxy_buffering off; | ||||||||
|
||||||||
| proxy_buffering off; | |
| proxy_buffering off; | |
| proxy_read_timeout 300s; |
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.
Consider adding
proxy_set_header X-Accel-Buffering no;to explicitly disable nginx's internal buffering mechanism. Whileproxy_buffering off;disables the main buffering, X-Accel-Buffering provides an additional layer of control specifically designed for streaming responses and ensures no buffering occurs at any level in nginx.