+ it('Should enable frameguard', async function () {
+ this.timeout(25000)
+
+ {
+ const res = await makeGetRequest({
+ url: server.url,
+ path: '/api/v1/config',
+ expectedStatus: 200
+ })
+
+ expect(res.headers['x-frame-options']).to.exist
+ }
+
+ await killallServers([ server ])
+
+ const config = {
+ security: {
+ frameguard: { enabled: false }
+ }
+ }
+ await server.run(config)
+
+ {
+ const res = await makeGetRequest({
+ url: server.url,
+ path: '/api/v1/config',
+ expectedStatus: 200
+ })
+
+ expect(res.headers['x-frame-options']).to.not.exist
+ }
+ })
+