Update server.js
This commit is contained in:
parent
21fd655a1f
commit
66db52e7c8
13
server.js
13
server.js
@ -21,7 +21,18 @@ databaseGlobals.setupDatabase()
|
|||||||
certificates.setupKeys()
|
certificates.setupKeys()
|
||||||
|
|
||||||
app.use(hpp())
|
app.use(hpp())
|
||||||
app.use(helmet())
|
app.use(helmet({
|
||||||
|
contentSecurityPolicy: {
|
||||||
|
directives: {
|
||||||
|
defaultSrc: ["'self'"],
|
||||||
|
scriptSrc: ["'self'", "https://cdnjs.cloudflare.com", "'unsafe-inline'"],
|
||||||
|
styleSrc: ["'self'", "'unsafe-inline'", "https://cdn.jsdelivr.net", "https://cdnjs.cloudflare.com"],
|
||||||
|
fontSrc: ["'self'", "https://cdn.jsdelivr.net", "https://cdnjs.cloudflare.com"],
|
||||||
|
connectSrc: ["'self'", "https://yggdrasil.azures.fr"],
|
||||||
|
imgSrc: ["'self'", "data:"],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}))
|
||||||
app.use(cors({ origin: "*" }))
|
app.use(cors({ origin: "*" }))
|
||||||
|
|
||||||
app.use(express.json())
|
app.use(express.json())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user