summaryrefslogtreecommitdiff
path: root/jekyll-hook.js
diff options
context:
space:
mode:
Diffstat (limited to 'jekyll-hook.js')
-rwxr-xr-xjekyll-hook.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jekyll-hook.js b/jekyll-hook.js
index 72785c7..ab1d6a9 100755
--- a/jekyll-hook.js
+++ b/jekyll-hook.js
@@ -10,6 +10,7 @@ var spawn = require('child_process').spawn;
var email = require('emailjs/email');
var mailer = email.server.connect(config.email);
var crypto = require('crypto');
+var hmac = crypto.createHmac('sha1', config.secret);
app.use(express.bodyParser({
verify: function(req,res,buffer){
@@ -22,7 +23,6 @@ app.use(express.bodyParser({
return;
}
- var hmac = crypto.createHmac('sha1', config.secret);
var recieved_sig = req.headers['x-hub-signature'].split('=')[1];
var computed_sig = hmac.update(buffer).digest('hex');