-
Notifications
You must be signed in to change notification settings - Fork 424
Add the ability to configure client_max_body_size #42
Conversation
Hi maintainers, have you got a chance to look at this yet? |
Second ping :) |
Hey @hone do you have a chance to take a look at this yet? |
Hi Heroku, just curious, is this repository still maintained? |
@daemonsy this looks good to me. let me see if i can figure out a good way for us to test this otherwise we can |
@daemonsy Hi, thanks for this PR. We aren't ignoring it, but it's probably not as simple as it seems. Most of the current features in As for writing a test, I think we would need to do an actual file upload to a post endpoint on an app that hits that limit, so for instance a 2mb file and ensure we get a 200 back. The inverse can potentially be done too, which is to set it lower than upload something that we would expect to get a 413. Ultimately, I couldn't find good prior art from other static hosting services and practically we need something like this to get around 413 errors for people. If you have some thoughts on the above, I would appreciate it. Thanks! |
Thanks @hone for the detailed write up. I was actually thinking of exactly the same thing when working on the PR, didn't like the If we make an assumption that the static buildpack will always be on NGINX, will it make sense to provide an override mechanism that matches 1:1? e.g. After making this PR, we found a few other tweaks we want to do the the nginx settings, having the nginx specific override makes it easier for people to do devopsy stuff, without making the buildpack harder to use for the clear cases. |
@daemonsy I've been against it so far, since I think that opens up pandora's box, but I'm not steadfast on it. This is probably out of the scope of this issue, but what other options were you looking at? What's the use case you're using the static buildpack for? |
Hi @hone I didn't get a notification on your last response, sorry I missed it. We're using it mainly to host JS single page apps, built on React / Ember. On these apps, the key problem we have is dealing with CORs. For more color on how we came to the static buildpack, we used to use divshot because it advertised itself to be a SPA hoster. Most of our apps are on Heroku and after a while, we moved off divshot and wanted Heroku to be the base of all our apps. At first we used superstatic but moved to heroku static buildpack because it's simpler. I think that the market clearly has a need for static app hosting that's geared towards being good at SPAs. That's how I view this buildpack. On the additional NGINX options, we are only looking at configuring the |
+1 |
Hi @hone we also have some gateway errors with the API proxying too. With some research, it seems to be caused by NGINX caching the resolution response, this is actually causing us issues on our Heroku single page apps proxying to backend apps. https://tenzer.dk/nginx-with-dynamic-upstreams/ There's another issue opened up on this repository that describes this better. |
A solution to this really is needed, as it's something that comes up too often. |
Can someone update it? |
Is anything happening here? |
hi all, waiting for this PR to be merged too... cheers! |
I wonder if there is any solution for this problem. I cannot believe that the PR is waiting more than 3 years. |
Hi This buildpack is now deprecated and we are recommending people move the more actively maintained heroku-buildpack-nginx. For migration advice see here. As such, I'm closing this PR out since we won't be making further changes to this buildpack. |
Background
By default, nginx uses a maximum of
1m
forclient_max_body_size
. This means requests above this will receive the413 Request Entity Too Large
error.In my use case, this happened during a resume upload in our job application tracking app, which uses nginx to proxy requests and avoid CORs.
What this does
client_max_body_size
to a configurable value under theserver
part of the config. This means that it's a global setting.max_body_size
instatic.json
so you can set the value. It's just taken as a string.Need help