'Azure functions v3 /HTTP trigger functions : Limiting the request body and URL size

I would like to see how I can limit the maxRequestLength and maxAllowedContentLength properties in an API that was created using HTTP triggers with Azure functions v3 (using .Net core app 3.1)

I have tried using a web.config file that just got ignored (expected). But I'm not sure what other options can be done. Please note that I'm trying to decrease the default limits not increase them !

Any help would be much appreciated. Thanks!



Solution 1:[1]

The HTTP request length is limited to 100 MB (104,857,600 bytes), and the URL length is limited to 4 KB (4,096 bytes). These limits are specified by the httpRuntime element of the runtime's Web.config file.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=csharp

reference to web.config https://github.com/Azure/azure-functions-host/blob/v3.x/src/WebJobs.Script.WebHost/web.config

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NILF