Skip to content

Commit

Permalink
Add tests for security HTTP headers
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimminich committed Sep 3, 2016
1 parent fbcc987 commit 2c33912
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/server/httpSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ var frisby = require('frisby');
var URL = 'http:https://localhost:3000';

frisby.create('GET response must contain CORS header allowing all origins')
.get(URL + "/dist/juice-shop.min.js")
.get(URL)
.expectStatus(200)
.expectHeaderContains('Access-Control-Allow-Origin', '*')
.toss();

frisby.create('GET response must contain sameorigin frameguard header')
.get(URL)
.expectStatus(200)
.expectHeaderContains('X-Frame-Options', 'sameorigin')
.toss();

frisby.create('GET response must contain nosniff content type header')
.get(URL)
.expectStatus(200)
.expectHeaderContains('X-Content-Type-Options', 'nosniff')
.toss();

0 comments on commit 2c33912

Please sign in to comment.