Is there a way to tell Nginx to completely discard file uploads (or the entire POST body) for certain locations?
Say I have a location block like so:
server {
listen [::]:80;
listen 80;
server_name foo.bor.com;
return 200 '{"foo": "bar"';
}
It's as simple as it looks like - Nginx always responds with a dummy JSON.
However, if the request to that endpoint includes a larger (10MB) file, the response from Nginx is substantially delayed (up to 3sec). I am guessing that's because Nginx still parses/buffers the multipart content.
Is there a way to instruct Nginx to ignore POST body completely?