oEmbed API should use CORS (#6562)
* oEmbed API should use CORS * Simplify cors function call --------- Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
parent
82c15dd48e
commit
7de5e13b25
|
@ -1,4 +1,5 @@
|
|||
import express from 'express'
|
||||
import cors from 'cors'
|
||||
import { escapeHTML, forceNumber } from '@peertube/peertube-core-utils'
|
||||
import { MChannelSummary } from '@server/types/models/index.js'
|
||||
import { EMBED_SIZE, PREVIEWS_SIZE, THUMBNAILS_SIZE, WEBSERVER } from '../initializers/constants.js'
|
||||
|
@ -8,6 +9,7 @@ import { accountNameWithHostGetValidator } from '../middlewares/validators/index
|
|||
const servicesRouter = express.Router()
|
||||
|
||||
servicesRouter.use('/oembed',
|
||||
cors(),
|
||||
apiRateLimiter,
|
||||
asyncMiddleware(oembedValidator),
|
||||
generateOEmbed
|
||||
|
|
Loading…
Reference in New Issue