Nick: temp rl for /extract

This commit is contained in:
Nicolas 2025-01-08 15:24:38 -03:00
parent a199208e21
commit 51cb4b1615
3 changed files with 19 additions and 1 deletions

View File

@ -204,7 +204,7 @@ v1Router.ws("/crawl/:jobId", crawlStatusWSController);
v1Router.post(
"/extract",
authMiddleware(RateLimiterMode.Scrape),
authMiddleware(RateLimiterMode.Extract),
checkCreditsMiddleware(1),
wrap(extractController),
);

View File

@ -71,6 +71,23 @@ const RATE_LIMITS = {
etier2a: 2500,
etierscale1: 1500,
},
extract: {
default: 20,
free: 10,
starter: 100,
standard: 100,
standardOld: 100,
scale: 300,
hobby: 20,
standardNew: 100,
standardnew: 100,
growth: 300,
growthdouble: 300,
etier2c: 1000,
etier1a: 1000,
etier2a: 1000,
etierscale1: 1000,
},
preview: {
free: 5,
default: 5,

View File

@ -132,6 +132,7 @@ export enum RateLimiterMode {
Preview = "preview",
Search = "search",
Map = "map",
Extract = "extract",
}
export type AuthResponse =