Azure AG WAF file upload

Liang, Gene 0 Reputation points
2024-08-13T09:29:17.3966667+00:00

We need to upload a file with size is about 100MB and got blocked by Application Gateway WAF, we use the "file upload" method which is described here: https://video2.skills-academy.com/en-us/azure/web-application-firewall/ag/application-gateway-waf-request-size-limits

"Only requests with Content-Type of multipart/form-data are considered for file uploads. For content to be considered as a file upload, it has to be a part of a multipart form with a filename header. For all other content types, the request body size limit applies."

We addeds Headers

Content-Type: multipart/form-data

Filename: example.txt

But the content was still treated as a request body and limited by 2MB max size...

How do make a proper request for "file uploads"? any example code will be helpful.

thank you!

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,078 questions
Azure Web Application Firewall
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 26,216 Reputation points Microsoft Employee
    2024-08-16T15:43:08.5233333+00:00

    @Liang, Gene

    Glad to know you were able to resolve the issue internally. If possible, it will help if you could share the resolution achieved here for community benefit.

    PS: Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer . Accepted answers are more likely to show up on any search made by the community regarding this issue

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.