Visit Website

Fast and simple way to check any HTTP Headers. Thanks Liran Tal and the amazing Snyk team for your support 😊. Usage: Command line - Using Node.js's npx to run a one-off scan of a website: npx check-my-headers https://example.com. The CLI will gracefully handle cases where the URL to scan is missing or wrong. Module - Using check-my-headers in your project: const checkMyHeaders = require('check-my-headers'); checkMyHeaders('http://example.com').then(({ messages, headers, status }) => { console.log(`Status code: ${status}`); console.log('Messages:'); console.log(messages); console.log('Current headers:'); console.log(headers); }); Output: Status code: 200, Messages: [{ msg: 'Remove field: server', type: 'error' }, { msg: 'Missing field: content-security-policy', type: 'error' }, { msg: 'Missing field: referrer-policy', type: 'error' }, { msg: 'Missing field: strict-transport-security', type: 'error' }, { msg: 'Missing field: x-xss-protection', type: 'error' }]

ALTERNATIVES