简体   繁体   中英

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!

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://learn.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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM