To fix the issue, you need to set the "SSL/TLS" option in Cloudflare to "Full" or "Full (strict)". It is important to also follow the instructions in our Cloudflare guide so the domain keeps working without any issues.
Selecting the "Full" option on Cloudflare to fix the "err_too_many_redirects" error.