Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

express-standard

angleman19MIT0.4.1

Easy method to define standard express headers and assist with Content-Security-Policy including social media widgets

express, headers, default, standard, csp, content, security, policy, social, media, widgets, facebook, twitter, google+, poweredby, powered-by, powered by, youtube, firebase

readme

express-standard NPM version Build Status Dependency Status License

Easy method to define standard express headers

Install :hammer:

npm install express-standard

Usage :wrench:

headers = require('express-standard');

app.use(

headers.set({
    "x-powered-by": "Awesomeness"
}));

headers.add({
    "Basic-Content-Security": "default-src 'self'"
});

app.use(headers.handle);

Powered By Sample :bulb:

app.use(headers.powered_by('Awesomeness'));
console.log(headers.get()) // { x-powered-by:"Awesomeness"}

SSL Only Basic Content Security Policy :bulb:

ssl_only = "default-src https:; script-src https: 'unsafe-inline'; style-src https: 'unsafe-inline'";

app.use(headers.set("Basic-Content-Security": ssl_only));

License: MIT :unlock: