This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
v2.0.0
Breaking changes
🔨 No default export
For compability with JS we have to export getCSP as a named export.
const { getCSP } = require('csp-header');
🔨 policies
was renamed to directives
🔨 Minimal supported version of Node.JS is 8
🔨 Dropped support of extend
extend
was marked as deprecated in previous versions. It doesn't work anymore. Use presets
instead.
🔨 Dropped support of specifying presets as a string
csp-header
used to require preset if you specify it as a string. Now, you should require it by yourself.
Before:
{
//...
presets: ['csp-preset-myservice']
}
Now:
{
//...
presets: [require('csp-preset-myservice')]
}
🔨 Calling with no arguments returns an empty string
It used to return undefined
.