Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'gist.github.com',
'www.google-analytics.com',
'd2wy8f7a9ursnm.cloudfront.net',
],
styleSrc: ["'self'", "'unsafe-inline'", 'github.githubassets.com'],
imgSrc: ['*', 'data:', 'blob:'],
frameSrc: ['*'],
connectSrc: compact([
"'self'",
process.env.AWS_S3_UPLOAD_BUCKET_URL,
'www.google-analytics.com',
]),
},
})
);
app.use(dnsPrefetchControl({ allow: true }));
app.use(referrerPolicy({ policy: 'no-referrer' }));
app.use(mount(routes));
/**
* Production updates and anonymous analytics.
*
* Set ENABLE_UPDATES=false to disable them for your installation
*/
if (
process.env.ENABLE_UPDATES !== 'false' &&
process.env.NODE_ENV === 'production'
) {
updates();
setInterval(updates, 24 * 3600 * 1000);
}