mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added rate limiting on wiki endpoint
This commit is contained in:
parent
9db647491a
commit
b237a022c3
1 changed files with 6 additions and 1 deletions
|
@ -176,7 +176,12 @@ module.exports = class Router
|
||||||
webRouter.get "/project/:Project_id/messages", AuthorizationMiddlewear.ensureUserCanReadProject, ChatController.getMessages
|
webRouter.get "/project/:Project_id/messages", AuthorizationMiddlewear.ensureUserCanReadProject, ChatController.getMessages
|
||||||
webRouter.post "/project/:Project_id/messages", AuthorizationMiddlewear.ensureUserCanReadProject, ChatController.sendMessage
|
webRouter.post "/project/:Project_id/messages", AuthorizationMiddlewear.ensureUserCanReadProject, ChatController.sendMessage
|
||||||
|
|
||||||
webRouter.get /learn(\/.*)?/, WikiController.getPage
|
webRouter.get /learn(\/.*)?/, RateLimiterMiddlewear.rateLimit({
|
||||||
|
endpointName: "wiki"
|
||||||
|
params: []
|
||||||
|
maxRequests: 60
|
||||||
|
timeInterval: 60
|
||||||
|
}), WikiController.getPage
|
||||||
|
|
||||||
webRouter.post "/project/:Project_id/references/index", AuthorizationMiddlewear.ensureUserCanReadProject, ReferencesController.index
|
webRouter.post "/project/:Project_id/references/index", AuthorizationMiddlewear.ensureUserCanReadProject, ReferencesController.index
|
||||||
webRouter.post "/project/:Project_id/references/indexAll", AuthorizationMiddlewear.ensureUserCanReadProject, ReferencesController.indexAll
|
webRouter.post "/project/:Project_id/references/indexAll", AuthorizationMiddlewear.ensureUserCanReadProject, ReferencesController.indexAll
|
||||||
|
|
Loading…
Reference in a new issue