mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-15 12:50:01 -04:00
Helmet implemented
This commit is contained in:
parent
0f8d9d437e
commit
7770199e14
1 changed files with 16 additions and 0 deletions
|
@ -77,6 +77,22 @@ 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: ["'none'"],
|
||||
objectSrc: ["'none'"],
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
// All website files are stored in the /views directory.
|
||||
// This takes one of those files and displays it for a site visitor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue