BREAKING: update CSP configuration
Disable it by default and add ability to specify a custom report uri
This commit is contained in:
parent
c8000975d3
commit
539d3f4faa
8 changed files with 36 additions and 19 deletions
16
server.ts
16
server.ts
|
@ -55,13 +55,15 @@ app.set('trust proxy', CONFIG.TRUST_PROXY)
|
|||
// Security middleware
|
||||
import { baseCSP } from './server/middlewares'
|
||||
|
||||
app.use(baseCSP)
|
||||
app.use(helmet({
|
||||
frameguard: {
|
||||
action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts
|
||||
},
|
||||
hsts: false
|
||||
}))
|
||||
if (CONFIG.CSP.ENABLED) {
|
||||
app.use(baseCSP)
|
||||
app.use(helmet({
|
||||
frameguard: {
|
||||
action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts
|
||||
},
|
||||
hsts: false
|
||||
}))
|
||||
}
|
||||
|
||||
// ----------- Database -----------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue