]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.ts
Translated using Weblate (Chinese (Traditional))
[github/Chocobozzz/PeerTube.git] / server.ts
index f44202c9af982bb294dd5563049c40046aa50809..2531080a30819902b2063b90c6af097d454a8452 100644 (file)
--- 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
   }))
 }