Personalized checkout and custom promotions with Shopify Scripts
How can I resolve this CSP violation error on Shopify Hydrogen 2.0 and successfully add Google Fonts to my theme? I've attempted to update the style-src directive with the Google Fonts URL, but the issue persists. Any insights or guidance on adjusting the CSP settings for the Hydrogen 2.0 theme would be greatly appreciated.
Thanks in advance!
Solved! Go to the solution
This is an accepted solution.
Hey @kiran121, you can update the createContentSecurityPolicy function in entry.server.tsx file to include "fonts.googleapis.com". However, this function does not merge the directives by default. You have to define all other styleSrc directives like this.
This is an accepted solution.
Hey @kiran121, you can update the createContentSecurityPolicy function in entry.server.tsx file to include "fonts.googleapis.com". However, this function does not merge the directives by default. You have to define all other styleSrc directives like this.
Thank you , it works
its not working for me btw
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024