From 6a9eeeb370f4dfb2b4ac7757dafc45b23f124e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 12 Dec 2024 19:39:24 +0100 Subject: [PATCH] Add createFunction abuse labels --- app/controllers/api/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 003efbad03..25e8886a46 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -141,6 +141,9 @@ App::post('/v1/functions') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('audits.event', 'function.create') ->label('audits.resource', 'function/{response.$id}') + ->label('abuse-key', 'projectId:{projectId}') + ->label('abuse-limit', 50) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT * 24) // 1 day ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'create')