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/oauth-clients.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/oauth-clients.ts')
-rw-r--r-- | server/controllers/api/oauth-clients.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/oauth-clients.ts b/server/controllers/api/oauth-clients.ts index eb7942fd6..b619b78a3 100644 --- a/server/controllers/api/oauth-clients.ts +++ b/server/controllers/api/oauth-clients.ts | |||
@@ -4,10 +4,12 @@ import { OAuthClientModel } from '@server/models/oauth/oauth-client' | |||
4 | import { HttpStatusCode, OAuthClientLocal } from '@shared/models' | 4 | import { HttpStatusCode, OAuthClientLocal } from '@shared/models' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { CONFIG } from '../../initializers/config' | 6 | import { CONFIG } from '../../initializers/config' |
7 | import { asyncMiddleware, openapiOperationDoc } from '../../middlewares' | 7 | import { apiRateLimiter, asyncMiddleware, openapiOperationDoc } from '../../middlewares' |
8 | 8 | ||
9 | const oauthClientsRouter = express.Router() | 9 | const oauthClientsRouter = express.Router() |
10 | 10 | ||
11 | oauthClientsRouter.use(apiRateLimiter) | ||
12 | |||
11 | oauthClientsRouter.get('/local', | 13 | oauthClientsRouter.get('/local', |
12 | openapiOperationDoc({ operationId: 'getOAuthClient' }), | 14 | openapiOperationDoc({ operationId: 'getOAuthClient' }), |
13 | asyncMiddleware(getLocalClient) | 15 | asyncMiddleware(getLocalClient) |