1 Answer
- Newest
- Most votes
- Most comments
0
Hi. Your regex looks fine and I gave it a quick test in my lab and it's blocking the correct email domains for me. I would suggest taking a systematic approach to rule out other issues, i.e. start with the setting for "How AWS WAF should handle the request if the JSON in the request body is invalid", and set that to "No Match" and see if the behaviour changes. Following that, try the same for the Oversize handling configuration. Failing that, I would guess that something else in the body of the request may be matching the regex - how complex/lage is the full body of the request?
answered a year ago
Relevant content
asked 2 years ago
asked 5 years ago
asked 5 years ago

Thank you for looking into this. I have determined that my data was submitted from a <form>, so the original approach didn't work. I made a small update to my regex by adding email= (e.g., email=[^&]+@(test.com|example....)), and it worked.
Great! Glad you got it working.