Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Rate limit batch lookup and sharing endpoints

AmanRajSinghMouryaf86abdefe7e7
diff --git a/server/pkg/middleware/rate_limit.go b/server/pkg/middleware/rate_limit.go
index b2b9ebaaa8..244ffd86e6 100644
--- a/server/pkg/middleware/rate_limit.go
+++ b/server/pkg/middleware/rate_limit.go
@@ -248,10 +248,12 @@ func (r *RateLimitMiddleware) getLimiter(reqPath string, reqMethod string) *limi
if isPublicCollectionUploadURLPath(reqPath) {
return r.limit250ReqPerMin
}
- if reqPath == "/collections/share/bulk" || reqPath == "/collections/unshare/bulk" {
+ if reqPath == "/collections/share/bulk" ||
+ reqPath == "/collections/share/batch" ||
+ reqPath == "/collections/unshare/bulk" {
return r.limit60ReqPerMin
}
- if reqPath == "/users/public-key" {
+ if reqPath == "/users/public-key" || reqPath == "/users/public-keys" {
return r.limit60ReqPerMin
}
if reqPath == "/paste/guard" || reqPath == "/paste/consume" {