diff --git a/src/lib/create-config.ts b/src/lib/create-config.ts index cad1a4e651..0942da29f7 100644 --- a/src/lib/create-config.ts +++ b/src/lib/create-config.ts @@ -655,7 +655,7 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig { ), constraintValues: parseEnvVarNumber( process.env.UNLEASH_CONSTRAINT_VALUES_LIMIT, - 250, + options?.resourceLimits?.constraintValues || 250, ), environments: parseEnvVarNumber( process.env.UNLEASH_ENVIRONMENTS_LIMIT, diff --git a/src/lib/types/option.ts b/src/lib/types/option.ts index b8d499ad45..fc476fed8e 100644 --- a/src/lib/types/option.ts +++ b/src/lib/types/option.ts @@ -141,6 +141,7 @@ export interface IUnleashOptions { metricsRateLimiting?: Partial; dailyMetricsStorageDays?: number; rateLimiting?: Partial; + resourceLimits?: Partial>; } export interface IEmailOption {