diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-20 14:17:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-20 14:17:34 +0200 |
commit | e915cde30ec47258a2beeec5ca748c928b59858c (patch) | |
tree | f5692ab20c534a61487f3bd471bb6105ed58d88a /server/controllers/api/search | |
parent | 923e41fa4f342019298b46e407ea1f0207f74205 (diff) | |
download | PeerTube-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.ts | 3 |
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 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { apiRateLimiter } from '@server/middlewares' | ||
2 | import { searchChannelsRouter } from './search-video-channels' | 3 | import { searchChannelsRouter } from './search-video-channels' |
3 | import { searchPlaylistsRouter } from './search-video-playlists' | 4 | import { searchPlaylistsRouter } from './search-video-playlists' |
4 | import { searchVideosRouter } from './search-videos' | 5 | import { searchVideosRouter } from './search-videos' |
5 | 6 | ||
6 | const searchRouter = express.Router() | 7 | const searchRouter = express.Router() |
7 | 8 | ||
9 | searchRouter.use(apiRateLimiter) | ||
10 | |||
8 | searchRouter.use('/', searchVideosRouter) | 11 | searchRouter.use('/', searchVideosRouter) |
9 | searchRouter.use('/', searchChannelsRouter) | 12 | searchRouter.use('/', searchChannelsRouter) |
10 | searchRouter.use('/', searchPlaylistsRouter) | 13 | searchRouter.use('/', searchPlaylistsRouter) |