Comparing version 0.3.5 to 0.3.6
@@ -8,4 +8,11 @@ var server = require('../server'); | ||
var file = req.parts.concat(); | ||
var key = req.query.key; | ||
var key = req.query && req.query.key; | ||
res.cookie('DPDAppUrl', process.url.href); | ||
if (key) { | ||
res.cookie('DPDAuthKey', key); | ||
return res.redirect('/__dashboard/'); | ||
} | ||
file.shift(); | ||
@@ -15,3 +22,3 @@ file = file.join('/'); | ||
if (file === '') { | ||
if (req.url.lastIndexOf('/') !== req.url.length - 1) { | ||
if (req.url.lastIndexOf('/') !== req.url.split('?')[0].length - 1) { | ||
return res.redirect(req.resource.path + '/'); | ||
@@ -23,8 +30,3 @@ } else { | ||
res.cookie('DPDAppUrl', process.url.href); | ||
if (key) { | ||
res.cookie('DPDAuthKey', authKey); | ||
} | ||
file = path.join('dashboard', file); | ||
@@ -31,0 +33,0 @@ |
@@ -94,2 +94,7 @@ /** | ||
// if dashboard | ||
if(!rawHdr && req.url.indexOf('/__dashboard') === 0) { | ||
rawHdr = req.query.key; | ||
} | ||
if(rawHdr) { | ||
@@ -128,2 +133,7 @@ try { | ||
server.error(function (err, req, res, next) { | ||
if(err instanceof Error) { | ||
res.statusCode = 500; | ||
res.send({message: err.message}); | ||
} | ||
res.statusCode = err.status || 400; | ||
@@ -130,0 +140,0 @@ res.send(err); |
{ | ||
"author": "Ritchie Martori", | ||
"name": "deployd", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "git://github.com/deployd/deployd.git" |
Sorry, the diff of this file is not supported yet
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
3520089
5356