Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Per-app option to disable nginx request buffering (proxy_request_buffering)
Everything related to the PHP CVE and eMudhra Cert Please read our Security issue thread - PHP and eMudhra cert compromise.

Per-app option to disable nginx request buffering (proxy_request_buffering)

Scheduled Pinned Locked Moved Feature Requests
nginxpackaging
4 Posts 2 Posters 160 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    T
    timka
    wrote last edited by joseph
    #1

    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!

    1 Reply Last reply
    2
    • girishG
      girishG
      girish
      Staff
      wrote last edited by
      #2

      This is a good request @timka . I started investigating this and this led me down to quite some rabbit hole. Will fix 🙂

      1 Reply Last reply
      2
      • girishG
        girishG
        girish
        Staff
        wrote last edited by girish
        #3

        I have fixed this now. There is now a new flag in the manifest called streamRequestBody which 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.

        1 Reply Last reply
        1
        • T
          T
          timka
          wrote last edited by
          #4

          @girish, fantastic fast response, thanks you a lot!!

          1 Reply Last reply
          0

          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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search