mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat: rate limiter (#4011)
This commit is contained in:
@@ -187,6 +187,25 @@ export interface AFFiNEConfig {
|
||||
path: string;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Rate limiter config
|
||||
*/
|
||||
rateLimiter: {
|
||||
/**
|
||||
* How long each request will be throttled (seconds)
|
||||
* @default 60
|
||||
* @env THROTTLE_TTL
|
||||
*/
|
||||
ttl: number;
|
||||
/**
|
||||
* How many requests can be made in the given time frame
|
||||
* @default 60
|
||||
* @env THROTTLE_LIMIT
|
||||
*/
|
||||
limit: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Redis Config
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user