Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add CORS to AP routes

Chocobozzz670e955c2229
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 84828e7e01..c3aeeebf55 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -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