aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/search
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-20 14:17:34 +0200
committerChocobozzz <me@florianbigard.com>2023-06-20 14:17:34 +0200
commite915cde30ec47258a2beeec5ca748c928b59858c (patch)
treef5692ab20c534a61487f3bd471bb6105ed58d88a /server/controllers/api/search
parent923e41fa4f342019298b46e407ea1f0207f74205 (diff)
downloadPeerTube-e915cde30ec47258a2beeec5ca748c928b59858c.tar.gz
PeerTube-e915cde30ec47258a2beeec5ca748c928b59858c.tar.zst
PeerTube-e915cde30ec47258a2beeec5ca748c928b59858c.zip
Fix runner api rate limit bypass
Diffstat (limited to 'server/controllers/api/search')
-rw-r--r--server/controllers/api/search/index.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/search/index.ts b/server/controllers/api/search/index.ts
index 39efc0b10..4d395161c 100644
--- a/server/controllers/api/search/index.ts
+++ b/server/controllers/api/search/index.ts
@@ -1,10 +1,13 @@
1import express from 'express' 1import express from 'express'
2import { apiRateLimiter } from '@server/middlewares'
2import { searchChannelsRouter } from './search-video-channels' 3import { searchChannelsRouter } from './search-video-channels'
3import { searchPlaylistsRouter } from './search-video-playlists' 4import { searchPlaylistsRouter } from './search-video-playlists'
4import { searchVideosRouter } from './search-videos' 5import { searchVideosRouter } from './search-videos'
5 6
6const searchRouter = express.Router() 7const searchRouter = express.Router()
7 8
9searchRouter.use(apiRateLimiter)
10
8searchRouter.use('/', searchVideosRouter) 11searchRouter.use('/', searchVideosRouter)
9searchRouter.use('/', searchChannelsRouter) 12searchRouter.use('/', searchChannelsRouter)
10searchRouter.use('/', searchPlaylistsRouter) 13searchRouter.use('/', searchPlaylistsRouter)