Per-app option to disable nginx request buffering (proxy_request_buffering)
-
Hi,
I’m trying to packaging an app that reverse-proxies uploads to a backend in real time (a tunnel/gateway app) to ease my setup. Cloudron’s nginx currently buffers the complete request body before passing it to the app (proxy_request_buffering on). For large uploads this means:
- clients see 100 % progress while the app hasn’t received any data yet,
- the whole body is written to the server disk first,
- the total upload time roughly doubles for streamed workloads.
- A manual test with proxy_request_buffering off; in the app’s vhost confirmed that streaming works as expected, but of course that change is overwritten whenever Cloudron regenerates the config.
Would it be possible to add a manifest option (for example "proxyRequestBuffering": false), or an admin setting per app, to disable request buffering for apps that need streaming uploads?
A related question: Cloudron replaces 502/503/504 responses from the app with its own appstatus.html page. Is there a way for an app to return its own error responses (for example JSON errors for API clients) instead?
Your's Tim, Thanks!
-
-
I have fixed this now. There is now a new flag in the manifest called
streamRequestBodywhich will help packages to disable request buffering. By default, the platform also now caps request bodies to 100M. Packages that want more have to enable this flag and also make sure they can deal with slowloris style DoS attacks. -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
