express-standard

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

express-standard

Easy method to define standard express headers

npm install express-standard
headers = require('express-standard');
 
app.use(
 
headers.set({
    "x-powered-by": "Awesomeness"
}));
 
headers.add({
    "Basic-Content-Security": "default-src 'self'"
});
 
app.use(headers.handle);
app.use(headers.powered_by('Awesomeness'));
console.log(headers.get()) // { x-powered-by:"Awesomeness"}
ssl_only = "default-src https:; script-src https: 'unsafe-inline'; style-src https: 'unsafe-inline'";
 
app.use(headers.set("Basic-Content-Security": ssl_only));