proxy_buffering off;
socksrust
PROOP

2 years ago

I need to set nginx config on NIX build.

21 Replies

brody
EMPLOYEE

2 years ago

what kind of app are you deploying


socksrust
PROOP

2 years ago

nextjs app


brody
EMPLOYEE

2 years ago

then nginx is not involved


brody
EMPLOYEE

2 years ago

please tell me the issues you are running into


socksrust
PROOP

2 years ago

I need an NGINX proxy


brody
EMPLOYEE

2 years ago

may I ask why? what issues are you running into


socksrust
PROOP

2 years ago

sure



socksrust
PROOP

2 years ago

It says on the nextjs docs:

The Next.js App Router supports streaming responses when self-hosting. If you are using Nginx or a similar proxy, you will need to configure it to disable buffering to enable streaming.

For example, you can disable buffering in Nginx by setting X-Accel-Buffering to no:


brody
EMPLOYEE

2 years ago

okay but nginx isn't involved in anyway when deploying a next app, and you can't configure anything about railways proxy


brody
EMPLOYEE

2 years ago

furthermore, railway's proxy does not buffer anyway


brody
EMPLOYEE

2 years ago

this is not the solution you are looking for


socksrust
PROOP

2 years ago

trust me bro


socksrust
PROOP

2 years ago

I k now


socksrust
PROOP

2 years ago

but its the only one that works


brody
EMPLOYEE

2 years ago

railway's proxy does not buffer


brody
EMPLOYEE

2 years ago

railway also doesn't use nginx, and neither does your deployment


socksrust
PROOP

2 years ago

I'm aware


socksrust
PROOP

2 years ago

ok thanks


brody
EMPLOYEE

2 years ago

please look for other solutions to the issue


flatypus
PRO

4 months ago

sorry to necropost, ran into this problem as well; if you happen to have cloudflare proxying for your backend, it will modify the request in a way that changes the transfer encoding from chunked/stream to text/plain. to anyone running into this make sure cloudflare isn't the culprit


Loading...