@exulu/backend 1.69.1 → 1.69.2

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/dist/index.cjs CHANGED
@@ -11187,10 +11187,11 @@ init_auth();
11187
11187
  var requestValidators = {
11188
11188
  authenticate: async (req) => {
11189
11189
  const rawApiKey = req.headers["exulu-api-key"] || req.headers["x-api-key"];
11190
- const apikey = rawApiKey?.replace(/^Bearer\s+/i, "") || null;
11190
+ const stripped = rawApiKey?.replace(/^Bearer\s+/i, "") ?? null;
11191
+ const apikey = stripped?.includes("/") ? stripped : void 0;
11191
11192
  const { db: db2 } = await postgresClient();
11192
11193
  let authtoken = null;
11193
- if (typeof apikey !== "string") {
11194
+ if (!apikey) {
11194
11195
  authtoken = await getToken((req.headers["authorization"] || req.headers["x-api-key"]) ?? "");
11195
11196
  }
11196
11197
  return await authentication({
package/dist/index.js CHANGED
@@ -213,10 +213,11 @@ import "express";
213
213
  var requestValidators = {
214
214
  authenticate: async (req) => {
215
215
  const rawApiKey = req.headers["exulu-api-key"] || req.headers["x-api-key"];
216
- const apikey = rawApiKey?.replace(/^Bearer\s+/i, "") || null;
216
+ const stripped = rawApiKey?.replace(/^Bearer\s+/i, "") ?? null;
217
+ const apikey = stripped?.includes("/") ? stripped : void 0;
217
218
  const { db } = await postgresClient();
218
219
  let authtoken = null;
219
- if (typeof apikey !== "string") {
220
+ if (!apikey) {
220
221
  authtoken = await getToken((req.headers["authorization"] || req.headers["x-api-key"]) ?? "");
221
222
  }
222
223
  return await authentication({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exulu/backend",
3
3
  "author": "Qventu Bv.",
4
- "version": "1.69.1",
4
+ "version": "1.69.2",
5
5
  "main": "./dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {