Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const scriptSources = ["'self'", "'unsafe-inline'", "'unsafe-eval'"];
- const styleSources = ["'self'", "'unsafe-inline'"];
- const connectSources = ["'self'"];
- app.use(
- helmet.contentSecurityPolicy({
- directives: {
- defaultSrc: ["'self'"],
- scriptSrc: scriptSources,
- scriptSrcElem: scriptSources,
- styleSrc: styleSources,
- connectSrc: connectSources
- },
- })
- );
Advertisement
Add Comment
Please, Sign In to add comment