mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
Merge pull request #7194 from overleaf/jpa-rate-limit-zip-download
[web] rate-limit project zip download requests GitOrigin-RevId: c99b7474de26b0e8a288863dccb60a25adfdc1b0
This commit is contained in:
@@ -670,11 +670,22 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
|
||||
webRouter.get(
|
||||
'/Project/:Project_id/download/zip',
|
||||
RateLimiterMiddleware.rateLimit({
|
||||
endpointName: 'zip-download',
|
||||
params: ['Project_id'],
|
||||
maxRequests: 10,
|
||||
timeInterval: 60,
|
||||
}),
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
ProjectDownloadsController.downloadProject
|
||||
)
|
||||
webRouter.get(
|
||||
'/project/download/zip',
|
||||
RateLimiterMiddleware.rateLimit({
|
||||
endpointName: 'multiple-projects-zip-download',
|
||||
maxRequests: 10,
|
||||
timeInterval: 60,
|
||||
}),
|
||||
AuthorizationMiddleware.ensureUserCanReadMultipleProjects,
|
||||
ProjectDownloadsController.downloadMultipleProjects
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user