TechRepublic shows you how to limit file upload size on NGINX to mitigate DoS attack.
How to limit file upload size on NGINX to mitigate DoS attack
If you have an NGINX site that must allow users to upload files, try this configuration to help prevent possible Denial-of-Service attacks.
How to limit file upload size on NGINX to mitigate DoS attack