misc: moved to plan-based rate limit

This commit is contained in:
Sheen Capadngan
2024-08-02 21:37:48 +08:00
parent a0490d0fde
commit 55a6740714
8 changed files with 82 additions and 12 deletions
+11 -1
View File
@@ -40,7 +40,17 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
secretRotation: true,
caCrl: false,
instanceUserManagement: false,
externalKms: false
externalKms: false,
rateLimits: {
readLimit: 60,
publicEndpointLimit: 30,
writeLimit: 200,
secretsLimit: 60,
authRateLimit: 60,
inviteUserRateLimit: 30,
mfaRateLimit: 20,
creationLimit: 30
}
});
export const setupLicenceRequestWithStore = (baseURL: string, refreshUrl: string, licenseKey: string) => {
@@ -1,5 +1,7 @@
import { TOrgPermission } from "@app/lib/types";
import { RateLimitConfiguration } from "../rate-limit/rate-limit-types";
export enum InstanceType {
OnPrem = "self-hosted",
EnterpriseOnPrem = "enterprise-self-hosted",
@@ -58,6 +60,7 @@ export type TFeatureSet = {
caCrl: false;
instanceUserManagement: false;
externalKms: false;
rateLimits: RateLimitConfiguration;
};
export type TOrgPlansTableDTO = {