You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The frontend handles the rendering logic. However, the messages are getting properly streamed on my localhost(with/without building the application) but when deployed, it's not working. I am deploying my application to a DigitalOcean server, and using Nginx.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am using a custom Hono backend and using the AI SDK core to stream the response from backend to frontend. The backend sends the response like this:
The frontend handles the rendering logic. However, the messages are getting properly streamed on my localhost(with/without building the application) but when deployed, it's not working. I am deploying my application to a DigitalOcean server, and using Nginx.
My Nginx has this configuration:
API block
location /be/chat { auth_basic off; proxy_buffering off; proxy_request_buffering off; chunked_transfer_encoding on; proxy_pass http://localhost:3001/; 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; }Frontend block
location / { proxy_buffering off; proxy_request_buffering off; chunked_transfer_encoding on; # Set headers for the proxied request 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; # Headers to prevent caching and ensure streaming proxy_set_header Cache-Control no-cache; proxy_set_header Connection ''; proxy_http_version 1.1; # Pass the request to your Next.js application proxy_pass http://localhost:5001; }I am not sure why is this happening. Can someone help me figure out the issue?
Beta Was this translation helpful? Give feedback.
All reactions