@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.
Files changed (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api.js +1 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.4
4
+
5
+ - support api key in query string
6
+
3
7
  ## 0.11.3
4
8
 
5
9
  - Fixed: get aws credential for production
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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "description": "Skynet Shared JS library",
5
5
  "type": "module",
6
6
  "main": "index.js",