Hello YSK
We understand that you're running into issues with Azure Front Door's Web Application Firewall (WAF) blocking your multipart/form-data requests to your backend API.
- Rule 200002: Triggers when the WAF fails to parse the request body correctly.
- Rule 200003: Triggers when the multipart content fails strict validation, often due to boundary or encoding issues
1.We Recommend Creating a Custom WAF Policy and Clone the default rule set and disable only rules 200002 and 200003 for the specific endpoint handling file uploads.
This avoids disabling the entire rule set and keeps other protections intact.
- Use WAF in Detection Mode, temporarily switch WAF to Detection mode to monitor and confirm false positives without blocking traffic, once confirmed, apply custom exclusions.
3.Consider adding your multipart requests to an exclusion list in the WAF configuration. This may help prevent the WAF from blocking these requests.
4.Ensure that the files you are trying to upload do not exceed any configured limits in the WAF settings. Azure WAF has configurable limits that can be adjusted based on your application requirements.
Refer: https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/custom-waf-rules-overview
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.