Merge pull request #2108 from overleaf/sk-add-rate-limit-to-project-page

Add a rate limit to the `/project` page

GitOrigin-RevId: ef77f092c94c6a88fc73354cee6b8572b84d3d3a
This commit is contained in:
Shane Kilkelly 2019-08-30 09:37:50 +01:00 committed by sharelatex
parent 869fcf7952
commit 84de1af960

View file

@ -262,6 +262,11 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
webRouter.get( webRouter.get(
'/project', '/project',
AuthenticationController.requireLogin(), AuthenticationController.requireLogin(),
RateLimiterMiddleware.rateLimit({
endpointName: 'open-project',
maxRequests: 20,
timeInterval: 60
}),
ProjectController.projectListPage ProjectController.projectListPage
) )
webRouter.post( webRouter.post(