aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-10 15:52:01 +0200
committerChocobozzz <me@florianbigard.com>2020-04-10 15:52:01 +0200
commit670e955c2229005b39ac7f90d4774042cd72b77d (patch)
treec9ba2bb46e3aa2f1a0750d2fa732e6738cca04fa
parent5e2b2e2775421cd98286d6e2f75cf38aae7a212c (diff)
downloadPeerTube-670e955c2229005b39ac7f90d4774042cd72b77d.tar.gz
PeerTube-670e955c2229005b39ac7f90d4774042cd72b77d.tar.zst
PeerTube-670e955c2229005b39ac7f90d4774042cd72b77d.zip
Add CORS to AP routes
-rw-r--r--server/controllers/activitypub/client.ts2
1 files changed, 2 insertions, 0 deletions
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 @@
1import * as express from 'express' 1import * as express from 'express'
2import * as cors from 'cors'
2import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' 3import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos'
3import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' 4import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub'
4import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' 5import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants'
@@ -39,6 +40,7 @@ import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/vid
39import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models' 40import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models'
40 41
41const activityPubClientRouter = express.Router() 42const activityPubClientRouter = express.Router()
43activityPubClientRouter.use(cors())
42 44
43// Intercept ActivityPub client requests 45// Intercept ActivityPub client requests
44 46