icons
icons copied to clipboard
CDN buttons blocked by CORS
I'm trying to follow the instructions on an Astro site:
CDN
Add the following script to the
of your site:<script src="https://cdn.vidstack.io/icons" type="module"></script>Use the element (icons are lazy loaded):
<media-icon type="play"></media-icon>
This results in a CORS error:
Access to script at 'https://cdn.vidstack.io/npm/[email protected]/dist/icons/play.js/+esm' from origin 'http://localhost:4321' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://cdn.vidstack.io/npm/[email protected]/dist/icons/play.js/+esm net::ERR_FAILED 421 (Misdirected Request)
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://cdn.vidstack.io/npm/[email protected]/dist/icons/play.js/+esm
I have the same issue. This url responds with 421: https://cdn.vidstack.io/npm/[email protected]/dist/icons/picture-in-picture.js/+esm