cli: [Bug]: shopify theme dev cors error

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

No CORS Error?

Actual behavior

Cors Error on .woff2 and other font file formats.

Reproduction steps

  1. Have a store on the newer CDN Structure
  2. Within a snippet have a style tag OR use .css.liquid
  3. Reference a font via e.g. "src: url({{- ‘AvenirNext-Regular.woff2’ | asset_url -}}) "
  4. Cors Error

Screenshot 2023-08-17 131026

Operating System

Windows 11

Shopify CLI version (check your project’s package.json if you’re not sure)

3.48.2

Shell

Git Bash

Node version (run node -v if you’re not sure)

v18.12.1

What language and version are you using in your application?

N/A Shopify Theme

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Thank you all for reporting the problem. A special shout-out to @bakura10 for sharing the full request path — that was really valuable.

The issue has been addressed by this https://github.com/Shopify/cli/pull/2711, and the fix will be available in the next patch release.

Thanks again for reporting, everyone.

Was this resolved? I’m still getting this on the latest version.

Thank you for providing additional details, @tomgreenhill!

Also, good news, I’ve noticed this issue was fixed by #2616 😃

👋 Hello everyone,

Thank you for bringing this scenario to our attention. The issue is currently being addressed in this PR: https://github.com/Shopify/cli/pull/2616.

Could you kindly confirm if this problem occurs exclusively on Firefox? I couldn’t reproduce it on Chrome.

I’m experiencing the same issue, but only with fonts — although am primarily working on one store at the moment.

image

I’m on:

macOS 13.4.1 (22F82) CLI @shopify/cli/3.45.1 darwin-arm64 node-v20.4.0 Node v18.7.0