Skip to content

Commit

Permalink
fix: usage identifier key condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Sep 23, 2022
1 parent ac45a34 commit c0b8d75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/events/http/HttpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
)
Expand Down

0 comments on commit c0b8d75

Please sign in to comment.