[Csnd-dev] unpkg CDN
Date | 2025-04-02 15:24 |
From | Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> |
Subject | [Csnd-dev] unpkg CDN |
I am having CORS issues with the unpkg CDN. Does anyone know any work-around? const { Csound } = await import('https://www.unpkg.com/@csound/browser@6.18.7/dist/csound.js’); gives me (running on a locals server, the same running from github pages) ping_cdn.html:1 Access to script at 'https://www.unpkg.com/@csound/browser@6.18.7/dist/csound.js' from origin 'http://127.0.0.1:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. ping_cdn.html:23 GET https://www.unpkg.com/@csound/browser@6.18.7/dist/csound.js net::ERR_FAILED 525 ping_cdn.html:35 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://www.unpkg.com/@csound/browser@6.18.7/dist/csound.js ======================== Prof. Victor Lazzarini Maynooth University Ireland |
Date | 2025-04-02 16:22 |
From | Steven Yi |
Subject | Re: [Csnd-dev] unpkg CDN |
Unsure but you could try the jsdelivr link: https://cdn.jsdelivr.net/npm/@csound/browser@6.18.7/dist/csound.js I couldn't load the unpkg one in my browser here but the jsdelivr one worked. We could also look at hosting these in a repo and publish on github pages so that they're always available. On Wed, Apr 2, 2025 at 10:24 AM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote: I am having CORS issues with the unpkg CDN. Does anyone know any work-around? |
Date | 2025-04-02 17:27 |
From | vlz |
Subject | Re: [Csnd-dev] unpkg CDN |
That worked, thanks. Yes, hosting our own may be a good idea. Prof. Victor Lazzarini Maynooth University Ireland On 2 Apr 2025, at 16:22, Steven Yi <stevenyi@gmail.com> wrote:
|