Skip to content

Refuse to load image - Content Security Policy directive #2128

Closed Answered by blittle
clementbouakilohmydev asked this question in Help
Discussion options

You must be logged in to vote

Update your createContentSecurityPolicy in entry.server.tsx to include an imgSrc directive:

  const {nonce, header, NonceProvider} = createContentSecurityPolicy({
    imgSrc: [
      "'self'",
      'https://cdn.shopify.com',
      'https://rickandmortyapi.com',
    ],
  });

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@clementbouakilohmydev
Comment options

Answer selected by blittle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants