@cubejs-backend/api-gateway
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -6,2 +6,14 @@ # Change Log | ||
## [0.6.1](https://github.com/statsbotco/cubejs-client/compare/v0.6.0...v0.6.1) (2019-04-11) | ||
### Features | ||
* Disable authentication checks in developer mode ([bc09eba](https://github.com/statsbotco/cubejs-client/commit/bc09eba)) | ||
* Formatted error logging in developer mode ([3376a50](https://github.com/statsbotco/cubejs-client/commit/3376a50)) | ||
# [0.6.0](https://github.com/statsbotco/cubejs-client/compare/v0.5.2...v0.6.0) (2019-04-09) | ||
@@ -8,0 +20,0 @@ |
19
index.js
@@ -119,3 +119,3 @@ const jwt = require('jsonwebtoken'); | ||
limit: Joi.number().integer().min(1).max(50000) | ||
}).or("measures","dimensions"); | ||
}).or("measures", "dimensions"); | ||
@@ -199,3 +199,3 @@ const normalizeQuery = (query) => { | ||
try { | ||
const query = JSON.parse(req.query.query) | ||
const query = JSON.parse(req.query.query); | ||
this.log(req, { | ||
@@ -302,6 +302,17 @@ type: 'Load Request', | ||
} catch (e) { | ||
res.status(403).json({ error: 'Invalid token' }); | ||
if (process.env.NODE_ENV === 'production') { | ||
res.status(403).json({ error: 'Invalid token' }); | ||
} else { | ||
this.log(req, { | ||
type: 'Invalid Token', | ||
token: auth, | ||
error: e.stack || e.toString() | ||
}); | ||
return next && next(); | ||
} | ||
} | ||
} else if (process.env.NODE_ENV === 'production') { | ||
res.status(403).send({ error: "Authorization header isn't set" }); | ||
} else { | ||
res.status(403).send({ error: "Authorization header isn't set" }); | ||
return next && next(); | ||
} | ||
@@ -308,0 +319,0 @@ return null; |
@@ -5,3 +5,3 @@ { | ||
"author": "Statsbot, Inc.", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"engines": { | ||
@@ -27,3 +27,3 @@ "node": ">=8.11.1" | ||
"license": "Apache-2.0", | ||
"gitHead": "8dfcbe0750319b25382f7f5cec38f94a20bfce1c" | ||
"gitHead": "94818eb1b00f5308da9bf189e8d612d2e0b7627b" | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
25674
328
3