Commit 0ceede13 authored by yPhil's avatar yPhil
Browse files

contentSecurityPolicy

parent b2af123b
Pipeline #495153 passed with stage
in 33 seconds
......@@ -27,17 +27,17 @@ app.use(helmet({contentSecurityPolicy: false, crossOriginEmbedderPolicy: false})
// app.use(helmet({contentSecurityPolicy: false, crossOriginEmbedderPolicy: false}));
// app.use(
// helmet.contentSecurityPolicy({
// directives: {
// defaultSrc: ["'self'", "https://www.googleapis.com", "https://api.dropboxapi.com", "https://content.dropboxapi.com", "https:"],
// imgSrc: ["'self'", "'unsafe-inline'", "https:", "data:"],
// styleSrc: ["'self'", "'unsafe-inline'"],
// scriptSrc: ["'self'", "'unsafe-inline'", "'unsafe-eval'"],
// scriptSrcAttr: null,
// },
// })
// );
app.use(
helmet.contentSecurityPolicy({
directives: {
defaultSrc: ["'self'", "https://www.googleapis.com", "https://api.dropboxapi.com", "https://content.dropboxapi.com", "https:"],
imgSrc: ["'self'", "'unsafe-inline'", "https:", "data:"],
styleSrc: ["'self'", "'unsafe-inline'"],
scriptSrc: ["'self'", "'unsafe-inline'", "'unsafe-eval'"],
scriptSrcAttr: null,
},
})
);
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment