X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.ts;h=2531080a30819902b2063b90c6af097d454a8452;hb=83960c39bc1d2123a0e13ca28c20b79b78fe7c18;hp=f44202c9af982bb294dd5563049c40046aa50809;hpb=dc48fdbe68e9dd3a3a6028181e61d8595d98e654;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server.ts b/server.ts index f44202c9a..2531080a3 100644 --- a/server.ts +++ b/server.ts @@ -59,11 +59,11 @@ import { baseCSP } from './server/middlewares/csp' 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 +} + +if (CONFIG.SECURITY.FRAMEGUARD.ENABLED) { + app.use(helmet.frameguard({ + action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts })) }