I have a web app where users are allowed to upload small images (10MB max). I enforce a client_max_body_size 10MB but I noticed, nginx will happily consume a 10GB file, filing up bandwidth and the tiny VPS I have running the app for minutes, before telling the user that the request was too large.
I would prefer it if it actively cancelled requests that were too large before filling up everything. Is there a way to
- Make nginx cancel requests like that early or
- Something other than multipart requests to upload images