mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
Merge pull request #1425 from sharelatex/spd-rate-limit-on-project-upload
Add rate limit on project upload GitOrigin-RevId: e2da5fb1815d85d8e82fe2f4498786f1fc5b5727
This commit is contained in:
parent
3af1ef48c2
commit
f32ecc744c
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ module.exports =
|
|||
apply: (webRouter, apiRouter) ->
|
||||
webRouter.post '/project/new/upload',
|
||||
AuthenticationController.requireLogin(),
|
||||
RateLimiterMiddlewear.rateLimit({
|
||||
endpointName: "project-upload"
|
||||
maxRequests: 20
|
||||
timeInterval: 60
|
||||
}),
|
||||
upload.single('qqfile'),
|
||||
ProjectUploadController.uploadProject
|
||||
|
||||
|
|
Loading…
Reference in a new issue