Refuse to load image - Content Security Policy directive #2128
-
Hi there, I want to connect my Hydrogen with external API's but if my image's url isn't a Shopify CDN i can't load image... I tried to changes my entry.server.tsx but not worked... Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
blittle
May 17, 2024
Replies: 1 comment 1 reply
-
Update your const {nonce, header, NonceProvider} = createContentSecurityPolicy({
imgSrc: [
"'self'",
'https://cdn.shopify.com',
'https://rickandmortyapi.com',
],
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
blittle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update your
createContentSecurityPolicy
inentry.server.tsx
to include animgSrc
directive: