aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/services.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/services.ts')
-rw-r--r--server/controllers/services.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/services.ts b/server/controllers/services.ts
index 7c7ca1ff3..0fd63a30f 100644
--- a/server/controllers/services.ts
+++ b/server/controllers/services.ts
@@ -2,17 +2,19 @@ import express from 'express'
2import { MChannelSummary } from '@server/types/models' 2import { MChannelSummary } from '@server/types/models'
3import { escapeHTML } from '@shared/core-utils/renderer' 3import { escapeHTML } from '@shared/core-utils/renderer'
4import { EMBED_SIZE, PREVIEWS_SIZE, THUMBNAILS_SIZE, WEBSERVER } from '../initializers/constants' 4import { EMBED_SIZE, PREVIEWS_SIZE, THUMBNAILS_SIZE, WEBSERVER } from '../initializers/constants'
5import { asyncMiddleware, oembedValidator } from '../middlewares' 5import { apiRateLimiter, asyncMiddleware, oembedValidator } from '../middlewares'
6import { accountNameWithHostGetValidator } from '../middlewares/validators' 6import { accountNameWithHostGetValidator } from '../middlewares/validators'
7import { forceNumber } from '@shared/core-utils' 7import { forceNumber } from '@shared/core-utils'
8 8
9const servicesRouter = express.Router() 9const servicesRouter = express.Router()
10 10
11servicesRouter.use('/oembed', 11servicesRouter.use('/oembed',
12 apiRateLimiter,
12 asyncMiddleware(oembedValidator), 13 asyncMiddleware(oembedValidator),
13 generateOEmbed 14 generateOEmbed
14) 15)
15servicesRouter.use('/redirect/accounts/:accountName', 16servicesRouter.use('/redirect/accounts/:accountName',
17 apiRateLimiter,
16 asyncMiddleware(accountNameWithHostGetValidator), 18 asyncMiddleware(accountNameWithHostGetValidator),
17 redirectToAccountUrl 19 redirectToAccountUrl
18) 20)