aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/config.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index b91519660..de7c2f6e2 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -561,15 +561,13 @@ describe('Test config', function () {
561 }) 561 })
562 562
563 it('Should remove the custom configuration', async function () { 563 it('Should remove the custom configuration', async function () {
564 this.timeout(10000)
565
566 await server.config.deleteCustomConfig() 564 await server.config.deleteCustomConfig()
567 565
568 const data = await server.config.getCustomConfig() 566 const data = await server.config.getCustomConfig()
569 checkInitialConfig(server, data) 567 checkInitialConfig(server, data)
570 }) 568 })
571 569
572 it('Should enable frameguard', async function () { 570 it('Should enable/disable security headers', async function () {
573 this.timeout(25000) 571 this.timeout(25000)
574 572
575 { 573 {
@@ -580,13 +578,15 @@ describe('Test config', function () {
580 }) 578 })
581 579
582 expect(res.headers['x-frame-options']).to.exist 580 expect(res.headers['x-frame-options']).to.exist
581 expect(res.headers['x-powered-by']).to.equal('PeerTube')
583 } 582 }
584 583
585 await killallServers([ server ]) 584 await killallServers([ server ])
586 585
587 const config = { 586 const config = {
588 security: { 587 security: {
589 frameguard: { enabled: false } 588 frameguard: { enabled: false },
589 powered_by_header: { enabled: false }
590 } 590 }
591 } 591 }
592 await server.run(config) 592 await server.run(config)
@@ -599,6 +599,7 @@ describe('Test config', function () {
599 }) 599 })
600 600
601 expect(res.headers['x-frame-options']).to.not.exist 601 expect(res.headers['x-frame-options']).to.not.exist
602 expect(res.headers['x-powered-by']).to.not.exist
602 } 603 }
603 }) 604 })
604 605