[英]Azure Application Gateway file upload limits
Recently I'm working with the Azure Application Gateway and when I try to upload a file I got the response 413 Entity Too Large.最近我正在使用 Azure 应用程序网关,当我尝试上传文件时收到响应 413 实体太大。 I read about it and the limit for the file upload is 2GB but I'm very confused because I uploaded successfully a file of 3.2 GB.
我读到了它,文件上传的限制是 2GB,但我很困惑,因为我成功上传了一个 3.2GB 的文件。 Are there any change in this limit?.
这个限制有什么变化吗? It fails when I try to upload a file of 4.6 GB.
当我尝试上传 4.6 GB 的文件时失败。 I'm using Standard_v2 SKU size.
我使用的是 Standard_v2 SKU 尺寸。
Other answer is misleading or poorly written.其他答案具有误导性或写得不好。 This answer should make it clearer as there are a few details
这个答案应该更清楚,因为有一些细节
Considering you want to enable the maximum limits on the V2 SKU , it behaves like this:考虑到您要启用V2 SKU的最大限制,它的行为如下:
Content-Type
set to multipart/form-data
, this will recognize it as a file upload (I've tested a bunch of other header values, and so far that one is only recognized as a file upload).Content-Type
设置为multipart/form-data
,这会将其识别为文件上传(我已经测试了一堆其他 header 值,到目前为止,只有一个被识别为文件上传)。 Any other content type will result in the evaluation of the maximum value set in the 'Max request body size (KB)' field, which can only handle 2000KB (2MB) as maximum value on OWASP 3.2 currently and just 128 KB for lower OWASP versions. If you go over the limit, you get the following message with HTTP status code 403:如果您 go 超过限制,您会收到以下消息,状态代码 HTTP 为 403:
<html> <head> <title>403 Forbidden</title> </head> <body> <center> <h1>403 Forbidden</h1> </center> <hr> <center>Microsoft-Azure-Application-Gateway/v2</center> </body> </html>
If you have WAF enabled and if your content type is a form based like application/json or application/xml or multipart/form-data , then it is considered as non-file upload.如果您启用了 WAF 并且您的内容类型是基于表单的表单,例如 application/json 或 application/xml 或 multipart/form-data ,则将其视为非文件上传。
OWASP rule is blocking the file upload. OWASP 规则阻止文件上传。 Check here for the rule definition.
在此处查看规则定义。
Work with your application team to change the content type or disable the rule in your WAF is you feel it is not an attach to your application.如果您觉得 WAF 不是应用程序的附件,请与您的应用程序团队合作更改内容类型或禁用 WAF 中的规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.