Nick:
This commit is contained in:
parent
de06b13deb
commit
c2ad358390
@ -130,7 +130,7 @@ export async function supaAuthenticateUser(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const team_endpoint_token = team_id;
|
const team_endpoint_token = token === "this_is_just_a_preview_token" ? iptoken : team_id;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await rateLimiter.consume(team_endpoint_token);
|
await rateLimiter.consume(team_endpoint_token);
|
||||||
|
@ -67,18 +67,11 @@ const createRateLimiter = (keyPrefix, points) =>
|
|||||||
duration: 60, // Duration in seconds
|
duration: 60, // Duration in seconds
|
||||||
});
|
});
|
||||||
|
|
||||||
export const previewRateLimiter = createRateLimiter(
|
|
||||||
"preview",
|
|
||||||
RATE_LIMITS.preview.default
|
|
||||||
);
|
|
||||||
export const serverRateLimiter = createRateLimiter(
|
export const serverRateLimiter = createRateLimiter(
|
||||||
"server",
|
"server",
|
||||||
RATE_LIMITS.account.default
|
RATE_LIMITS.account.default
|
||||||
);
|
);
|
||||||
export const crawlStatusRateLimiter = createRateLimiter(
|
|
||||||
"crawl-status",
|
|
||||||
RATE_LIMITS.crawlStatus.default
|
|
||||||
);
|
|
||||||
export const testSuiteRateLimiter = createRateLimiter(
|
export const testSuiteRateLimiter = createRateLimiter(
|
||||||
"test-suite",
|
"test-suite",
|
||||||
RATE_LIMITS.testSuite.default
|
RATE_LIMITS.testSuite.default
|
||||||
|
Loading…
Reference in New Issue
Block a user