refactor: add optional disabled config
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Vendored
+14
-10
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user