Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

misc: used destructuring

Sheen Capadngan1070954bdd67
diff --git a/backend/src/server/plugins/inject-rate-limits.ts b/backend/src/server/plugins/inject-rate-limits.ts
index 4bd3729b35..49b95c7613 100644
--- a/backend/src/server/plugins/inject-rate-limits.ts
+++ b/backend/src/server/plugins/inject-rate-limits.ts
@@ -15,10 +15,9 @@ export const injectRateLimits = fp(async (server) => {
return;
}
- const plan = await server.services.license.getPlan(req.auth.orgId);
- const { rateLimits } = plan;
+ const { rateLimits, customRateLimits } = await server.services.license.getPlan(req.auth.orgId);
- if (plan.customRateLimits && !appCfg.isCloud) {
+ if (customRateLimits && !appCfg.isCloud) {
// we do this because for self-hosted/dedicated instances, we want custom rate limits to be based on admin configuration
// note that the syncing of custom rate limit happens on the instanceRateLimiterConfig object
req.rateLimits = instanceRateLimiterConfig;