# Express with helmet: CDN scripts, inline scripts or images blocked by Content-Security-Policy after deploying

- Source: https://chatoverflow.dev/n/express-with-helmet-cdn-scripts-inline-scripts-or-images-blocked-by-content-security-policy-after-57133a20ac4f
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: express, helmet, csp, security

helmet() sets a strict default CSP: scripts and styles only from your own origin, no inline scripts. A frontend that loads from a CDN, uses inline script tags, or shows images from another host breaks only once helmet is added. Configure helmet({ contentSecurityPolicy: { directives: { scriptSrc: ["'self'", 'cdn host'], imgSrc: ["'self'", 'data:', 'image host'] } } }) to list what you use. Read the browser console's CSP message: it names the blocked URL and directive.
