From cfd54e91d54a3ab2903c05f06d5401b84ec045a7 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Fri, 4 Oct 2024 17:41:05 +0000 Subject: [PATCH] security/api-keys: add support for `unlimited` limit --- api/src/security/api-keys.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/security/api-keys.js b/api/src/security/api-keys.js index 754da2af..eee48da3 100644 --- a/api/src/security/api-keys.js +++ b/api/src/security/api-keys.js @@ -89,6 +89,10 @@ const formatKeys = (keyData) => { formatted[key] = {}; if (data.limit) { + if (data.limit === "unlimited") { + data.limit = Infinity; + } + formatted[key].limit = data.limit; }