Update rate-limiter.ts
This commit is contained in:
@@ -17,6 +17,7 @@ const RATE_LIMITS = {
|
|||||||
growthdouble: 50,
|
growthdouble: 50,
|
||||||
etier2c: 300,
|
etier2c: 300,
|
||||||
etier1a: 1000,
|
etier1a: 1000,
|
||||||
|
etier2a: 300,
|
||||||
},
|
},
|
||||||
scrape: {
|
scrape: {
|
||||||
default: 20,
|
default: 20,
|
||||||
@@ -32,6 +33,7 @@ const RATE_LIMITS = {
|
|||||||
growthdouble: 1000,
|
growthdouble: 1000,
|
||||||
etier2c: 2500,
|
etier2c: 2500,
|
||||||
etier1a: 1000,
|
etier1a: 1000,
|
||||||
|
etier2a: 2500,
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
default: 20,
|
default: 20,
|
||||||
@@ -47,6 +49,7 @@ const RATE_LIMITS = {
|
|||||||
growthdouble: 500,
|
growthdouble: 500,
|
||||||
etier2c: 2500,
|
etier2c: 2500,
|
||||||
etier1a: 1000,
|
etier1a: 1000,
|
||||||
|
etier2a: 2500,
|
||||||
},
|
},
|
||||||
map:{
|
map:{
|
||||||
default: 20,
|
default: 20,
|
||||||
@@ -62,6 +65,7 @@ const RATE_LIMITS = {
|
|||||||
growthdouble: 500,
|
growthdouble: 500,
|
||||||
etier2c: 2500,
|
etier2c: 2500,
|
||||||
etier1a: 1000,
|
etier1a: 1000,
|
||||||
|
etier2a: 2500,
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
free: 5,
|
free: 5,
|
||||||
@@ -134,6 +138,13 @@ export const etier1aRateLimiter = new RateLimiterRedis({
|
|||||||
duration: 60, // Duration in seconds
|
duration: 60, // Duration in seconds
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const etier2aRateLimiter = new RateLimiterRedis({
|
||||||
|
storeClient: redisRateLimitClient,
|
||||||
|
keyPrefix: "etier2a",
|
||||||
|
points: 2500,
|
||||||
|
duration: 60, // Duration in seconds
|
||||||
|
});
|
||||||
|
|
||||||
const testSuiteTokens = [
|
const testSuiteTokens = [
|
||||||
"a01ccae",
|
"a01ccae",
|
||||||
"6254cf9",
|
"6254cf9",
|
||||||
@@ -192,6 +203,10 @@ export function getRateLimiter(
|
|||||||
return etier1aRateLimiter;
|
return etier1aRateLimiter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(teamId && teamId === process.env.ETIER2A_TEAM_ID) {
|
||||||
|
return etier2aRateLimiter;
|
||||||
|
}
|
||||||
|
|
||||||
if(teamId && manual.includes(teamId)) {
|
if(teamId && manual.includes(teamId)) {
|
||||||
return manualRateLimiter;
|
return manualRateLimiter;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user