})
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)
{
})
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)
})
expect(res.headers['x-frame-options']).to.not.exist
+ expect(res.headers['x-powered-by']).to.not.exist
}
})