CORS Blocking iFrame

anon-dev
New Member
2 0 0

I need to load a html page inside an iframe into product-template.liquid.

The html page contains a separately developed client-side component which by design, is isolated from the template.

That page works fine if I load it on it's own, or in an iframe from another html page; but when I try to load it from the intended product page it gets blocked by CORS.

Error message: Uncaught DOMException: Blocked a frame with origin "https://cdn.shopify.com" from accessing a cross-origin frame.

All files on the domain of the store (including the page I need to load) are hosted on https://cdn.shopify.com/. It was added as an asset to the theme being used.

So to achieve this, I need to either:

  • a) be able to upload the file to the store's domain, or
  • b) be able to allow CORS for https://cdn.shopify.com/ on the domain.

Any help with this would be really appreciated.

0 Likes
anon-dev
New Member
2 0 0

Nevermind - I couldn't find a solution to the above issue, so I had to use a different approach instead.

0 Likes