Couple days ago, the CORS error appears for /leadflows.js:
Access to script at 'https://js-eu1.hsleadflows.net/leadflows.js' from origin '[MyWebSite]' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Avoid mixed-protocol requests that trigger CORS blocks. Ensure your site and the HubSpot script both load over HTTPS. If your page is on HTTP, switch the page to HTTPS.
Don’t try to change headers on HubSpot assets. You can’t modify HubSpot’s Access-Control-Allow-Origin header, so avoid proxying or fetching the script via XHR/fetch; load it normally on the page.
Clear cache and test in a clean browser session (or incognito), and temporarily disable any ad blockers when testing.
Confirm the HubSpot tracking code is installed on every page (paste it just before the tag). This ensures pop-up forms load properly on external sites.
If this helps, feel free to mark it as the solution and give it an upvote !
“Have you recently switched to HTTPS, changed domains, or begun loading the script through a tag manager/custom fetch?” => no, nothing on that.
“In Webflow’s Project Settings > Custom Code > remove any direct script tags that load leadflows.js, e.g.,” => there is not a direct call to the leadflows.js, but it’s part of the HubSpot Embed Code script:
<!-- Start of HubSpot Embed Code -->
<script type=“text/javascript” id=“hs-script-loader” async defer src=“//js-eu1.hs-scripts.com/XXXXXXXX.js”></script>
<!-- End of HubSpot Embed Code -->
I have also reconnected webflow and hubspot - issue still exists.
Hey @AZhukouski - thanks for posting all of this context in the Community!
Hoping that it assists @Jigar_Thakker with additional troubleshooting steps.
Shane, Community Manager
Now you have removed the code, but these were my findings before you did so.
After checking your website, I think the issue you were facing: an old tracking URL was 404, where you were getting the CORS. You added the new code to the website, but did not remove the old one.
And the tracking was also not above this tag </body>
This might have been the possible issue, but as we know, the leadflow file isn’t accessible for a couple of days now. Connecting with support for your specific use here is the best way forward.
Let me know if you need any further assistance. Happy to help!
If this helps, feel free to mark it as the solution and give it an upvote !