How to Limit the Request Body Size in ASP.NET Core
By default, ASP.NET Core reads a request body of up to about 28.6 MB. An API that takes small JSON documents has no use for that, and lowering it means a huge body gets turned away before your code spends any time on it.
