Add CORS to AP routes

pull/2639/head
Chocobozzz 2020-04-10 15:52:01 +02:00
parent 5e2b2e2775
commit 670e955c22
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import * as express from 'express'
import * as cors from 'cors'
import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos'
import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub'
import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants'
@ -39,6 +40,7 @@ import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/vid
import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models'
const activityPubClientRouter = express.Router()
activityPubClientRouter.use(cors())
// Intercept ActivityPub client requests