fh-millicore-client
Advanced tools
Comparing version 0.6.11-pre to 0.6.11-pre2
@@ -15,4 +15,4 @@ var request = require('request'); | ||
function preFlightValidate(req, key, cb){ | ||
if (!req.millicoreHeaders) return cb("Missing req.millicoreHeaders! (if calling this from a test, use 'req.millicoreHeaders' instead of 'req.headers'"); | ||
if (!cfg.millicore.url) return cb("Invalid request! Missing 'cfg.millicore.url' field in config"); | ||
if (!req.millicoreHeaders.host) return cb("Missing req.millicoreHeaders! (if calling this from a test, use 'req.millicoreHeaders' instead of 'req.headers'"); | ||
if (!req.millicoreHeaders.host) return cb("Invalid request! Missing 'host' field in headers"); | ||
if (!key.label || !key.key) return cb("Invalid request! No key label or key specified"); | ||
@@ -28,3 +28,3 @@ return cb(); | ||
// Note: doesn't matter what 'domain' is here in the mc url | ||
var url = cfg.scheme + cfg.millicore.url + '/box/srv/1.1/ide/' + req.params.domain + '/user/addKey'; | ||
var url = cfg.scheme + req.millicoreHeaders.host + '/box/srv/1.1/ide/' + req.params.domain + '/user/addKey'; | ||
var headers = req.millicoreHeaders; | ||
@@ -31,0 +31,0 @@ //This kind of defeats the purpose of a CSRF check, but since ngui issues a GET the header is never set. This request should really just be a GET anyway!! |
{ | ||
"name": "fh-millicore-client", | ||
"version": "0.6.10", | ||
"version": "0.6.9", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "fh-internal-stats": { |
{ | ||
"name": "fh-millicore-client", | ||
"version": "0.6.11-pre", | ||
"version": "0.6.11-pre2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,5 +6,3 @@ var proxyquire = require('proxyquire'); | ||
var cfg = { | ||
millicore: { | ||
url: 'http://dummycore' | ||
} | ||
url: 'http://dummycore' | ||
}; | ||
@@ -11,0 +9,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
113642
2913