aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/oauth-clients.ts
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/oauth-clients.ts
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/oauth-clients.ts')
-rw-r--r--server/controllers/api/oauth-clients.ts4
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'
4import { HttpStatusCode, OAuthClientLocal } from '@shared/models' 4import { HttpStatusCode, OAuthClientLocal } from '@shared/models'
5import { logger } from '../../helpers/logger' 5import { logger } from '../../helpers/logger'
6import { CONFIG } from '../../initializers/config' 6import { CONFIG } from '../../initializers/config'
7import { asyncMiddleware, openapiOperationDoc } from '../../middlewares' 7import { apiRateLimiter, asyncMiddleware, openapiOperationDoc } from '../../middlewares'
8 8
9const oauthClientsRouter = express.Router() 9const oauthClientsRouter = express.Router()
10 10
11oauthClientsRouter.use(apiRateLimiter)
12
11oauthClientsRouter.get('/local', 13oauthClientsRouter.get('/local',
12 openapiOperationDoc({ operationId: 'getOAuthClient' }), 14 openapiOperationDoc({ operationId: 'getOAuthClient' }),
13 asyncMiddleware(getLocalClient) 15 asyncMiddleware(getLocalClient)