@vitrical/utils
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -35,5 +35,7 @@ "use strict"; | ||
try { | ||
if (!apiKey) | ||
console.error('Missing apiKey variable'); | ||
if (req.headers['key'] !== apiKey) { | ||
if (!apiKey) { | ||
throw new Error('Missing apiKey variable'); | ||
} | ||
const clientKey = req.headers['key'] || req.query['_apiKey']; | ||
if (clientKey !== apiKey) { | ||
res.status(403).send({ msg: 'Invalid API Key' }); | ||
@@ -40,0 +42,0 @@ return; |
{ | ||
"name": "@vitrical/utils", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "Collection of useful functions and typings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
47632
818