Local theme dev via CLI: CORS errors on assets

Local theme dev via CLI: CORS errors on assets

MostHostLA
Shopify Partner
8 0 3

While working on theme development locally,
Almost all internal resources that pass through the CDN (so essentially any item linked from assets) is being blocked as a cross-origin request.

 

Can't find much in the way of documentation on how to bypass this short of turning it off for the browser, which is most definitely not desirable.


Luckily you can see the correct items when you do a push, but having to push to see your changes on the actual store is counter-productive to local development.

 

Wondering if anyone has a fix for this.


Particularly, I'd love to see information on where the cli sets up the internal server so that an .htaccess can be added to disable CORS at the domain level and not the browser level.


It would also be nice if such info were to be added to the documentation where it should live...

 

 

Also flagged this as a bug for cli. Where hopefully by poking through code I can sort out where to add the .htaccess...
https://github.com/Shopify/shopify-cli/issues/2678

Reply 1 (1)

MostHostLA
Shopify Partner
8 0 3

The issue for fonts seems to have been addressed on Shopify CLI version: 3.23.0