mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-02 09:25:47 +00:00
Merge pull request #1312 from sharelatex/ja-add-rate-limits
Add rate limits to adding emails and changing password GitOrigin-RevId: e73c17985cc9c74d60f8856b3b47b28fecd0d489
This commit is contained in:
parent
2cf7fefaeb
commit
7bf860cde5
1 changed files with 10 additions and 0 deletions
|
@ -127,9 +127,19 @@ module.exports = class Router
|
|||
if Features.hasFeature 'affiliations'
|
||||
webRouter.post '/user/emails',
|
||||
AuthenticationController.requireLogin(),
|
||||
RateLimiterMiddlewear.rateLimit({
|
||||
endpointName: 'add-email',
|
||||
maxRequests: 10
|
||||
timeInterval: 60
|
||||
}),
|
||||
UserEmailsController.add
|
||||
webRouter.post '/user/emails/delete',
|
||||
AuthenticationController.requireLogin(),
|
||||
RateLimiterMiddlewear.rateLimit({
|
||||
endpointName: 'delete-email',
|
||||
maxRequests: 10
|
||||
timeInterval: 60
|
||||
}),
|
||||
UserEmailsController.remove
|
||||
webRouter.post '/user/emails/default',
|
||||
AuthenticationController.requireLogin(),
|
||||
|
|
Loading…
Reference in a new issue