cover your head. security headers middleware.
Cover your head.
Security headers middleware for connect or express.
Further readings on middlewares can be found here

var hood = require'hood';appusehood;
This will setup sane defaults for most apps. You can also pass options to configure each middleware.
appusehood csp: "default-src 'unsafe-inline'" hsts: false // pass false to disable a middlware ;
Each middleware is also available individually.
appusehoodcsp;appusehoodcsp policy: 'default-src': 'self' 'unsafe-inline' ;appusehoodcsp"default-src 'self';"; // to use Report-Only appusehoodcsp policy: somePolicy reportOnly: trueappusehoodcsppolicyStr true;
Only applies header if request is secure. Checks req.connection.encrypted and req.connection.proxySecure.
appusehoodhsts;appusehoodhsts maxAge: 1000 // seconds includeSubdomains: true // default false ;appusehoodhsts1000 true;
appusehoodxframe // DENY appusehoodxframe sameOrigin: true;appusehoodxframe allow: 'http://example.domain';appusehoodxframe'SAMEORIGIN';appusehoodxframe'ALLOW-FROM http://example.domain';
appusehoodnosniff;
A convenience method when you need to add arbitrary headers to all requests.
appusehoodheader'x-foo' 'bar';appusehoodheader 'x-foo': 'bar' 'x-baz': 'quux';