Reduced Helmet Stuff

This commit is contained in:
QuiteAFancyEmerald 2024-07-07 17:53:27 -07:00
parent 7d924aaff4
commit 23e2d4835f
3 changed files with 7 additions and 19 deletions

View file

@ -80,20 +80,8 @@ server.on('upgrade', (req, socket, head) => {
// Apply Helmet middleware for security
app.use(helmet({
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
styleSrc: ["'self'", 'https:', "'unsafe-inline'"],
scriptSrc: ["'self'", 'https:', "'unsafe-inline'"],
imgSrc: ["'self'", 'data:', '*.amazonaws.com'],
fontSrc: ["'self'", 'https:', 'data:'],
mediaSrc: ["'self'", 'https:', 'data:'],
connectSrc: ["'self'", 'https:'],
frameSrc: ["'self'"],
objectSrc: ["'none'"],
},
},
}));
contentSecurityPolicy: false // Disable CSP
}));
// All website files are stored in the /views directory.
// This takes one of those files and displays it for a site visitor.