node-github-webhook
Advanced tools
Comparing version 1.0.2 to 1.0.3
16
index.js
@@ -42,2 +42,3 @@ /** | ||
} | ||
console.log(ret) | ||
return ret | ||
@@ -60,9 +61,12 @@ } | ||
var currentOptions | ||
if (Array.isArray(options)) { | ||
options = findHandler(req.url, options) | ||
currentOptions = findHandler(req.url, options) | ||
} else { | ||
currentOptions = options | ||
} | ||
checkType(options) | ||
checkType(currentOptions) | ||
if (req.url.split('?').shift() !== options.path) | ||
if (req.url.split('?').shift() !== currentOptions.path) | ||
return callback() | ||
@@ -73,3 +77,3 @@ | ||
var id = req.headers['x-github-delivery'] | ||
var events = options.events | ||
var events = currentOptions.events | ||
@@ -93,3 +97,3 @@ if (!sig) | ||
var obj | ||
var computedSig = new Buffer(signBlob(options.secret, data)) | ||
var computedSig = new Buffer(signBlob(currentOptions.secret, data)) | ||
@@ -115,3 +119,3 @@ if (!bufferEq(new Buffer(sig), computedSig)) | ||
url: req.url, | ||
path: options.path | ||
path: currentOptions.path | ||
} | ||
@@ -118,0 +122,0 @@ |
{ | ||
"name": "node-github-webhook", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Github Webhooks handler based on Node.js. Support multiple handlers.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
8593
96