From 5d9d76956651abda24f8967b0690da5a93dcbd9c Mon Sep 17 00:00:00 2001 From: Ian Sutherland Date: Sat, 1 Oct 2022 11:16:01 -0600 Subject: [PATCH] fix: checking generated api key (#1589) --- src/events/http/HttpServer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/http/HttpServer.js b/src/events/http/HttpServer.js index cd93b9b6e..bb5a4cf63 100644 --- a/src/events/http/HttpServer.js +++ b/src/events/http/HttpServer.js @@ -906,9 +906,11 @@ export default class HttpServer { const apiKey = createApiKey() this.#apiKeysValues = getApiKeysValues( - this.#serverless.service.provider.apiGateway?.apiKeys ?? [apiKey], + this.#serverless.service.provider.apiGateway?.apiKeys ?? [], ) + this.#apiKeysValues.push(apiKey) + log.notice(`Key with token: ${apiKey}`) } }