]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/jobs.ts
Fix runner api rate limit bypass
[github/Chocobozzz/PeerTube.git] / server / controllers / api / jobs.ts
index b63e2f962cf6ad37d9d0b4bfdd7954d1c3f4ab6d..c701bc970bca6db31b771b1bcd45c28d04237cec 100644 (file)
@@ -4,6 +4,7 @@ import { HttpStatusCode, Job, JobState, JobType, ResultList, UserRight } from '@
 import { isArray } from '../../helpers/custom-validators/misc'
 import { JobQueue } from '../../lib/job-queue'
 import {
+  apiRateLimiter,
   asyncMiddleware,
   authenticate,
   ensureUserHasRight,
@@ -17,6 +18,8 @@ import { listJobsValidator } from '../../middlewares/validators/jobs'
 
 const jobsRouter = express.Router()
 
+jobsRouter.use(apiRateLimiter)
+
 jobsRouter.post('/pause',
   authenticate,
   ensureUserHasRight(UserRight.MANAGE_JOBS),