mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1657 from sharelatex/sk-rate-limit-join-project
Add a rate-limit to joinProject GitOrigin-RevId: 27edd8b56ae80868b5fcd0b803d0e042dce26f31
This commit is contained in:
parent
36d0e8e199
commit
f3dd61abce
1 changed files with 7 additions and 1 deletions
|
@ -30,4 +30,10 @@ module.exports =
|
||||||
# Called by the real-time API to load up the current project state.
|
# Called by the real-time API to load up the current project state.
|
||||||
# This is a post request because it's more than just a getting of data. We take actions
|
# This is a post request because it's more than just a getting of data. We take actions
|
||||||
# whenever a user joins a project, like updating the deleted status.
|
# whenever a user joins a project, like updating the deleted status.
|
||||||
apiRouter.post '/project/:Project_id/join', AuthenticationController.httpAuth, EditorHttpController.joinProject
|
apiRouter.post '/project/:Project_id/join', AuthenticationController.httpAuth,
|
||||||
|
RateLimiterMiddleware.rateLimit({
|
||||||
|
endpointName: "join-project"
|
||||||
|
params: ["Project_id"]
|
||||||
|
maxRequests: 30
|
||||||
|
timeInterval: 60
|
||||||
|
}), EditorHttpController.joinProject
|
||||||
|
|
Loading…
Reference in a new issue