diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-10 15:52:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-10 15:52:01 +0200 |
commit | 670e955c2229005b39ac7f90d4774042cd72b77d (patch) | |
tree | c9ba2bb46e3aa2f1a0750d2fa732e6738cca04fa /server/controllers | |
parent | 5e2b2e2775421cd98286d6e2f75cf38aae7a212c (diff) | |
download | PeerTube-670e955c2229005b39ac7f90d4774042cd72b77d.tar.gz PeerTube-670e955c2229005b39ac7f90d4774042cd72b77d.tar.zst PeerTube-670e955c2229005b39ac7f90d4774042cd72b77d.zip |
Add CORS to AP routes
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/activitypub/client.ts | 2 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import * as cors from 'cors' | ||
2 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' | 3 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' |
3 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' | 4 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' |
4 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' | 5 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' |
@@ -39,6 +40,7 @@ import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/vid | |||
39 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models' | 40 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models' |
40 | 41 | ||
41 | const activityPubClientRouter = express.Router() | 42 | const activityPubClientRouter = express.Router() |
43 | activityPubClientRouter.use(cors()) | ||
42 | 44 | ||
43 | // Intercept ActivityPub client requests | 45 | // Intercept ActivityPub client requests |
44 | 46 | ||