Socket
Socket
Sign inDemoInstall

csp-by-app

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "csp-by-app",
"version": "0.0.1",
"version": "0.0.2",
"description": "Manage Certificate Security Policy (CSP) by specifying third party APIs by name",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,2 +10,4 @@ CSP By App significantly cuts down on CSP policy management by specifying common APIs by name.

var cspByApp = require('csp-by-app')
var basePolicy = {

@@ -23,3 +25,3 @@ defaultSrc: [CSP_SELF],

var policy = simpleCSP(basePolicy, ['twitter', 'mixpanel', 'googleFonts', 'stripe', 'typekit', 'ractive'])
var policy = cspByApp(basePolicy, ['twitter', 'mixpanel', 'googleFonts', 'stripe', 'typekit', 'ractive'])

@@ -26,0 +28,0 @@ Then use that policy with an existing node CSP implementation like [Helmet](https://www.npmjs.com/package/helmet) or [express-csp](https://github.com/yahoo/express-csp).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc