From c0b8d7574742dfd1a3a576193912b44623ea51a4 Mon Sep 17 00:00:00 2001 From: dnalborczyk Date: Thu, 22 Sep 2022 22:03:03 -0400 Subject: [PATCH] fix: usage identifier key condition --- src/events/http/HttpServer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/events/http/HttpServer.js b/src/events/http/HttpServer.js index 8490b3f4f..3ed2ec37b 100644 --- a/src/events/http/HttpServer.js +++ b/src/events/http/HttpServer.js @@ -452,7 +452,10 @@ export default class HttpServer { ) { const { usageIdentifierKey } = request.auth.credentials - if (usageIdentifierKey !== this.#options.apiKey) { + if ( + usageIdentifierKey !== this.#options.apiKey && + !this.#apiKeysValues.has(usageIdentifierKey) + ) { log.debug( `Method '${method}' of function '${functionKey}' token '${usageIdentifierKey}' not valid.`, )