diff options
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 02a9d4026..08aef2908 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -201,10 +201,12 @@ function checkUrlsSameHost (url1: string, url2: string) { | |||
201 | return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase() | 201 | return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase() |
202 | } | 202 | } |
203 | 203 | ||
204 | function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string) { | 204 | function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string, scheme?: string) { |
205 | if (!scheme) scheme = REMOTE_SCHEME.HTTP | ||
206 | |||
205 | const host = video.VideoChannel.Actor.Server.host | 207 | const host = video.VideoChannel.Actor.Server.host |
206 | 208 | ||
207 | return REMOTE_SCHEME.HTTP + '://' + host + path | 209 | return scheme + '://' + host + path |
208 | } | 210 | } |
209 | 211 | ||
210 | // --------------------------------------------------------------------------- | 212 | // --------------------------------------------------------------------------- |