@certik/skynet 0.11.3 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/api.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/api.js
CHANGED
|
@@ -42,7 +42,7 @@ async function logEndMiddleware(req, res, next) {
|
|
|
42
42
|
const apiKeyMiddleware = (key) => {
|
|
43
43
|
async function requireAPIKey(req, res, next) {
|
|
44
44
|
try {
|
|
45
|
-
const apiKey = req.get("x-api-key");
|
|
45
|
+
const apiKey = req.get("x-api-key") || req.query["api-key"]; // api key present either in header or query string
|
|
46
46
|
|
|
47
47
|
if (!apiKey) {
|
|
48
48
|
inline.log("request without api key");
|