webzod
account

Set object-src to 'none' on Shopify

headers.csp.object_src · effort: minutes

Why it matters

Without a restrictive object-src, object and embed tags can load content from any source. Hardly any site still needs plugins, so blocking them is usually free.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. Shopify's own header has no fetch directives, so this comes from a meta http-equiv Content-Security-Policy tag in your theme (layout/theme.liquid or a snippet it renders) or from an app. In Online Store, Themes, Edit code, search for Content-Security-Policy; if an app prints the tag, ask its developer.
  2. Check that no page uses object or embed tags (PDF viewers sometimes do), then add object-src 'none' to the tag's content value and save.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.