fix: resolve feedback + new endpoint + new write rate limit

This commit is contained in:
ShubhamPalriwala
2024-06-10 07:59:59 +05:30
parent 6c0ab43c97
commit 0e86d5573a
5 changed files with 27 additions and 11 deletions
+8 -1
View File
@@ -69,8 +69,15 @@ export const creationLimit: RateLimitOptions = {
// Public endpoints to avoid brute force attacks
export const publicEndpointLimit: RateLimitOptions = {
// Shared Secrets
// Read Shared Secrets
timeWindow: 60 * 1000,
max: 30,
keyGenerator: (req) => req.realIp
};
export const publicSecretShareCreationLimit: RateLimitOptions = {
// Create Shared Secrets
timeWindow: 60 * 1000,
max: 5,
keyGenerator: (req) => req.realIp
};