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:
Alasdair Smith 2019-01-22 11:23:15 +00:00 committed by sharelatex
parent 3af1ef48c2
commit f32ecc744c

View file

@ -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