chore: Rate limiter audit (#3965)

* chore: Rate limiter audit api/users

* Make requests required

* api/collections

* Remove checkRateLimit on FileOperation (now done at route level through rate limiter)

* auth rate limit

* Add metric logging when rate limit exceeded

* Refactor to shared configs

* test
This commit is contained in:
Tom Moor
2022-08-14 16:04:04 +01:00
committed by GitHub
parent 9338328a82
commit a326e0ee88
14 changed files with 367 additions and 282 deletions

View File

@@ -14,3 +14,15 @@ export default class MockRateLimiter {
return false;
}
}
export const RateLimiterStrategy = new Proxy(
{},
{
get() {
return {
duration: 60,
requests: 10,
};
},
}
);