refactor: add optional disabled config

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-03-19 10:49:03 +01:00
parent d8c26d5e6d
commit 4e265180aa
3 changed files with 99 additions and 19 deletions
+14 -10
View File
@@ -34,16 +34,20 @@ export interface Config {
* unless you configure credentials for service calls.
*/
dangerouslyDisableDefaultAuthPolicy?: boolean;
rateLimit?: {
/**
* Limit each IP to max requests per window
*/
max?: number;
/**
* The duration for which the rate limit is enforced
*/
window?: HumanDuration;
};
rateLimit?:
| false
| {
/**
* Limit each IP to max requests per window
*/
max?: number;
/**
* The duration for which the rate limit is enforced
*/
window?: HumanDuration;
disable?: true;
};
};
};