-
Notifications
You must be signed in to change notification settings - Fork 201
Fix Shopify hosted fonts to load via the local preview URL #1821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THIS IS AMAZING! So simple. Thanks for fixing this 👏
Not working for me |
Hi, @pinguluk! I believe it's not working because this fix is not released https://github.com/Shopify/shopify-cli/blob/main/CHANGELOG.md?plain=1#L2-L9 yet. It will be available on our next release soon :) |
Hey @karreiro, forgot to mention, that I uninstalled the shopify-cli gem and installed it again via specific_install, that allowed me to install the shopify-cli from this github repo. I know that the update is not yet released officially, but I see that the fix is already merged in the main branch and that's why I installed this verison. I've checked the files locally too and I confirm the changes you've made are there: But the fix still doesn't work for me. |
Thanks a lot for these extra details, @pinguluk. The fix should work indeed, as you're relying on Could you please share an screenshot similar to this one? That would allow me to see the HTTP status and the URL of the font we're missing. Thanks again for the details! :) |
Locally: 2 |
Thanks for the details, @pinguluk 🎉 I've miss included the suffix I will open a PR fixing it soon! :) |
I confirm that by changing Thank you for your awesome work! 🎉 |
WHY are these changes introduced?
Fonts were not loading because the Shopify fonts CDN expects a valid HTTP referer header.
WHAT is this pull request doing?
This PR introduces changes in the
ShopifyCLI::Theme::DevServer
to request fonts from the CDN with the expected headers and serve them locally.How to test your changes?
shopify theme serve
serviceBefore this PR:
After this PR:
Post-release steps
None.
Update checklist