I use Laravel (v9.52.16) with Inertia.
In front-end (Vue.js) I have an email field and in back-end (PHP 8.1.22) I do validations. I use RFC and DNS validationsto authorize only valid emails with valid DNS. (https://laravel.com/docs/9.x/validation#rule-email).
Everything works fine, for valid email and invalid email, but my QA team tried the email [email protected]. But for this one, it triggers the Error 502 "Bad Gateway" after 10s waiting for the server response.
Request::validate([
'email' => ['required', 'email:rfc,dns'],
]);
What you need to know:
- On localhost it works
- This problem was found on my test environment hosted on AWS, it doesn't works
[email protected]seems valid, but with the Error 502 I'm not sure[email protected]is valid[email protected]is not valid- I tried without the DNS validator ('email:rfc') the email is valid
I was wondering if the problem wasn't coming directly from DNS, because everything works with the rest. So I got the domain information, but I can't find anything that explains the problem.
https://www.whois.com/whois/valide.com (DNS not working)
https://www.whois.com/whois/valide.ca (Working DNS for comparison)
$dnsRecords = @dns_get_record($host, DNS_MX + DNS_A + DNS_AAAA);- so I'm assuming that called directly, outside of any Laravel wrappers, would get you the same kind of response?