cross-origin-resource-policy
v0.3.0
Published
Middleware to set the Cross-Origin-Resource-Policy header
Downloads
114
Maintainers
Keywords
Readme
Cross-Origin-Resource-Policy middleware
This middleware sets the Cross-Origin-Resource-Policy
header. Read about it in the spec.
Usage:
const crossOriginResourcePolicy = require("cross-origin-resource-policy");
// Sets "Cross-Origin-Resource-Policy: same-origin"
app.use(crossOriginResourcePolicy({ policy: "same-origin" }));
// Sets "Cross-Origin-Resource-Policy: same-site"
app.use(crossOriginResourcePolicy({ policy: "same-site" }));