mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 10:18:16 +00:00
misc: added license check in backend for custom rate limits
This commit is contained in:
@@ -449,7 +449,8 @@ export const registerRoutes = async (
|
||||
keyStore
|
||||
});
|
||||
const rateLimitService = rateLimitServiceFactory({
|
||||
rateLimitDAL
|
||||
rateLimitDAL,
|
||||
licenseService
|
||||
});
|
||||
const apiKeyService = apiKeyServiceFactory({ apiKeyDAL, userDAL });
|
||||
|
||||
@@ -910,7 +911,10 @@ export const registerRoutes = async (
|
||||
|
||||
const cronJobs: CronJob[] = [];
|
||||
if (appCfg.isProductionMode) {
|
||||
cronJobs.push(rateLimitService.initializeBackgroundSync());
|
||||
const rateLimitJob = await rateLimitService.initializeBackgroundSync();
|
||||
if (rateLimitJob) {
|
||||
cronJobs.push(rateLimitJob);
|
||||
}
|
||||
}
|
||||
|
||||
server.decorate<FastifyZodProvider["store"]>("store", {
|
||||
|
||||
Reference in New Issue
Block a user