I need to set proxy_redirect off; proxy_buffering off;

How to set these variables proxy_redirect off; proxy_buffering off; in railway app project settings ? I am deploying Django project
6 Replies
Percy
Percy2y ago
Project ID: N/A
krshnaprog
krshnaprog2y ago
N/A
Brody
Brody2y ago
those are nginx settings, railway itself doesn't use nginx, and doesn't expose any similar settings anyway. I've never seen anyone ask about these settings, perhaps you are looking at this the wrong way? what errors or difficulties are you facing that lead you to believe turning such settings off would solve your problems?
ZEYD
ZEYD16mo ago
@Brody I know this case is a little bit old but I just run into the same issue and searched for it here before opening another ticket. In my case I need the function to deactivate proxy_buffering for my Django projects Gunicorn server. I have some async functions and they wont work like I need them to without disabling proxy_buffering. See reference gunicorn documentation:
If you want to be able to handle streaming request/responses or other fancy features like Comet, Long polling, or Web sockets, you need to turn off the proxy buffering. When you do this you must run with one of the async worker classes. To turn off buffering, you only need to add proxy_buffering off; to your location block: ... location @proxy_to_app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_buffering off; proxy_pass http://app_server; } ... (https://docs.gunicorn.org/en/stable/deploy.html)
Nevermind, solved. It was another issue that was blocking my function.
Brody
Brody16mo ago
I'm glad you solved it
Want results from more Discord servers?
Add your server