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/plugins.ts | |
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/plugins.ts')
-rw-r--r-- | server/controllers/api/plugins.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/plugins.ts b/server/controllers/api/plugins.ts index e85fd6e11..337b72b2f 100644 --- a/server/controllers/api/plugins.ts +++ b/server/controllers/api/plugins.ts | |||
@@ -4,6 +4,7 @@ import { getFormattedObjects } from '@server/helpers/utils' | |||
4 | import { listAvailablePluginsFromIndex } from '@server/lib/plugins/plugin-index' | 4 | import { listAvailablePluginsFromIndex } from '@server/lib/plugins/plugin-index' |
5 | import { PluginManager } from '@server/lib/plugins/plugin-manager' | 5 | import { PluginManager } from '@server/lib/plugins/plugin-manager' |
6 | import { | 6 | import { |
7 | apiRateLimiter, | ||
7 | asyncMiddleware, | 8 | asyncMiddleware, |
8 | authenticate, | 9 | authenticate, |
9 | availablePluginsSortValidator, | 10 | availablePluginsSortValidator, |
@@ -35,6 +36,8 @@ import { | |||
35 | 36 | ||
36 | const pluginRouter = express.Router() | 37 | const pluginRouter = express.Router() |
37 | 38 | ||
39 | pluginRouter.use(apiRateLimiter) | ||
40 | |||
38 | pluginRouter.get('/available', | 41 | pluginRouter.get('/available', |
39 | openapiOperationDoc({ operationId: 'getAvailablePlugins' }), | 42 | openapiOperationDoc({ operationId: 'getAvailablePlugins' }), |
40 | authenticate, | 43 | authenticate, |