fix: keep custom widget limits client safe
This commit is contained in:
1 parent
ca20431d84
commit
17aef0588f
9 files changed
+27
-23
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { createHash, randomUUID } from "node:crypto";
|
||||
|
||||
import { CUSTOM_WIDGET_USER_ITEM_CONCURRENCY_LIMIT } from "../core/request-limits";
|
||||
import { CustomWidgetDomainError } from "./errors";
|
||||
|
||||
const WINDOW_MS = 60_000;
|
||||
@@ -7,7 +8,6 @@ const WINDOW_MS = 60_000;
|
||||
// Keep the lease above that total and identify every acquisition so a late
|
||||
// release can never remove capacity owned by a newer request.
|
||||
export const CUSTOM_WIDGET_REQUEST_CONCURRENCY_TTL_MS = 60_000;
|
||||
export const CUSTOM_WIDGET_USER_ITEM_CONCURRENCY_LIMIT = 4;
|
||||
export const CUSTOM_WIDGET_DEFINITION_CONCURRENCY_LIMIT = 8;
|
||||
const CATEGORY_LIMITS = { query: 60, action: 10, delete: 3 } as const;
|
||||
const DEFINITION_CATEGORY_LIMITS = { query: 240, action: 40, delete: 12 } as const;
|
||||
|
||||
Reference in new issue
Block a user