SVG asset blocked by browser. Unsafe attempt to load URL [cdn...] from frame with URL [ourdomain...]

WhipMeister
New Member
1 0 0

 

(Very experienced js developer but very new to Shopify/Liquid)

We've shoehorned a proprietary component into the liquid ecosystem and hit a stumbling block.

1) Uploaded an SVG file as an asset (widgets.svg), referenced it in some js code as

var aFile = "{{'widgets.svg' | asset_url}}" ;

2) Browser complains "SVG asset blocked by browser. Unsafe attempt to load URL [cdn...] from frame with URL [ourdomain...]. Domains, protocols and ports must match."

What returns the URL of the asset relative to our domain root instead of the internal cdn root so that we can blow past this?

Thanks in advance.

0 Likes