mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2996 from overleaf/jpa-rate-limit-project-download
[misc] rate limit the download of project revisions to 30 per user/hour GitOrigin-RevId: 81244a0dad1cf183da69406ef488f6684d5f134a
This commit is contained in:
parent
ce3ca981a8
commit
cafe9387f8
1 changed files with 5 additions and 0 deletions
|
@ -543,6 +543,11 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
)
|
||||
webRouter.get(
|
||||
'/project/:project_id/version/:version/zip',
|
||||
RateLimiterMiddleware.rateLimit({
|
||||
endpointName: 'download-project-revision',
|
||||
maxRequests: 30,
|
||||
timeInterval: 60 * 60
|
||||
}),
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
HistoryController.downloadZipOfVersion
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue