From 670e955c2229005b39ac7f90d4774042cd72b77d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Apr 2020 15:52:01 +0200 Subject: [PATCH] Add CORS to AP routes --- server/controllers/activitypub/client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 84828e7e0..c3aeeebf5 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