If you're trying to collect leads from an external website (like a WordPress site) using an AJAX form, you might see a CORS error in the browser console. This means the request was blocked because it came from another domain.
To allow requests from specific websites, edit the file: app/Config/Cors.php
'allowedOrigins' => ['https://www.your-wordpress-website.com'],