]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/config.ts
Add x-powered-by header
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / config.ts
index b91519660dbfbdf19c10cd76ba3f4a224d2f76d2..de7c2f6e28320e379865123cf0e4e3be8954e82a 100644 (file)
@@ -561,15 +561,13 @@ describe('Test config', function () {
   })
 
   it('Should remove the custom configuration', async function () {
-    this.timeout(10000)
-
     await server.config.deleteCustomConfig()
 
     const data = await server.config.getCustomConfig()
     checkInitialConfig(server, data)
   })
 
-  it('Should enable frameguard', async function () {
+  it('Should enable/disable security headers', async function () {
     this.timeout(25000)
 
     {
@@ -580,13 +578,15 @@ describe('Test config', function () {
       })
 
       expect(res.headers['x-frame-options']).to.exist
+      expect(res.headers['x-powered-by']).to.equal('PeerTube')
     }
 
     await killallServers([ server ])
 
     const config = {
       security: {
-        frameguard: { enabled: false }
+        frameguard: { enabled: false },
+        powered_by_header: { enabled: false }
       }
     }
     await server.run(config)
@@ -599,6 +599,7 @@ describe('Test config', function () {
       })
 
       expect(res.headers['x-frame-options']).to.not.exist
+      expect(res.headers['x-powered-by']).to.not.exist
     }
   })