Files
shields/services/security-headers/security-headers.tester.js
Morten Bøgh 6128aa55de [SecurityHeaders] Added a possibility for no follow redirects (#6212)
* Added a possibility for no follow redirects

* Changed from noFollowRedirects to ignoreRedirects

* Update services/security-headers/security-headers.service.js

Co-authored-by: chris48s <chris48s@users.noreply.github.com>

* correct test color

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-02-27 19:32:09 +00:00

12 lines
467 B
JavaScript

'use strict'
const t = (module.exports = require('../tester').createServiceTester())
t.create('grade of https://shields.io')
.get('/security-headers.json?url=https://shields.io')
.expectBadge({ label: 'security headers', message: 'F', color: 'red' })
t.create('grade of https://httpstat.us/301 as redirect')
.get('/security-headers.json?ignoreRedirects&url=https://httpstat.us/301')
.expectBadge({ label: 'security headers', message: 'R', color: 'blue' })