feat(backend-app-api): start implementing in memory rate limit
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Vendored
+12
@@ -14,6 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { HumanDuration } from '@backstage/types';
|
||||
|
||||
export interface Config {
|
||||
backend?: {
|
||||
auth?: {
|
||||
@@ -32,6 +34,16 @@ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user