mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added rate limit to compile endpoint
This commit is contained in:
parent
477278eea5
commit
0961a034ea
1 changed files with 7 additions and 1 deletions
|
@ -111,7 +111,13 @@ module.exports = class Router
|
|||
webRouter.post '/project/:Project_id/settings', AuthorizationMiddlewear.ensureUserCanWriteProjectSettings, ProjectController.updateProjectSettings
|
||||
webRouter.post '/project/:Project_id/settings/admin', AuthorizationMiddlewear.ensureUserCanAdminProject, ProjectController.updateProjectAdminSettings
|
||||
|
||||
webRouter.post '/project/:Project_id/compile', AuthorizationMiddlewear.ensureUserCanReadProject, CompileController.compile
|
||||
webRouter.post '/project/:Project_id/compile', RateLimiterMiddlewear.rateLimit({
|
||||
endpointName: "compile-project-http"
|
||||
params: ["Project_id"]
|
||||
maxRequests: 800
|
||||
timeInterval: 60 * 60
|
||||
}), AuthorizationMiddlewear.ensureUserCanReadProject, CompileController.compile
|
||||
|
||||
webRouter.post '/project/:Project_id/compile/stop', AuthorizationMiddlewear.ensureUserCanReadProject, CompileController.stopCompile
|
||||
|
||||
# Used by the web download buttons, adds filename header
|
||||
|
|
Loading…
Reference in a new issue