diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -55,13 +55,15 @@ app.set('trust proxy', CONFIG.TRUST_PROXY) | |||
55 | // Security middleware | 55 | // Security middleware |
56 | import { baseCSP } from './server/middlewares' | 56 | import { baseCSP } from './server/middlewares' |
57 | 57 | ||
58 | app.use(baseCSP) | 58 | if (CONFIG.CSP.ENABLED) { |
59 | app.use(helmet({ | 59 | app.use(baseCSP) |
60 | frameguard: { | 60 | app.use(helmet({ |
61 | action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts | 61 | frameguard: { |
62 | }, | 62 | action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts |
63 | hsts: false | 63 | }, |
64 | })) | 64 | hsts: false |
65 | })) | ||
66 | } | ||
65 | 67 | ||
66 | // ----------- Database ----------- | 68 | // ----------- Database ----------- |
67 | 69 | ||