frameguard
Advanced tools
Comparing version 1.1.0 to 2.0.0
22
index.js
@@ -1,20 +0,10 @@ | ||
var isString = require('lodash.isstring') | ||
var isString = require('./lib/isstring') | ||
function isObject (value) { | ||
return !!value && typeof value === 'object' | ||
} | ||
module.exports = function frameguard (options) { | ||
options = options || {} | ||
module.exports = function frameguard (action, domain) { | ||
var domain = options.domain | ||
var action = options.action | ||
var directive | ||
// This converts String objects. | ||
if (isString(action)) { | ||
action = action.valueOf() | ||
} | ||
if (isObject(action)) { | ||
domain = action.domain | ||
action = action.action | ||
} | ||
if (action === undefined) { | ||
@@ -21,0 +11,0 @@ directive = 'SAMEORIGIN' |
@@ -8,3 +8,3 @@ { | ||
"description": "Middleware to set X-Frame-Options headers", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -28,5 +28,2 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"lodash.isstring": "4.0.1" | ||
}, | ||
"devDependencies": { | ||
@@ -33,0 +30,0 @@ "connect": "^3.4.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
6
4700
33
- Removedlodash.isstring@4.0.1
- Removedlodash.isstring@4.0.1(transitive)