mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Don't guess remote tracker URL
This commit is contained in:
parent
2451916e45
commit
d9a2a03196
21 changed files with 458 additions and 94 deletions
|
@ -201,10 +201,12 @@ function checkUrlsSameHost (url1: string, url2: string) {
|
|||
return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase()
|
||||
}
|
||||
|
||||
function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string) {
|
||||
function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string, scheme?: string) {
|
||||
if (!scheme) scheme = REMOTE_SCHEME.HTTP
|
||||
|
||||
const host = video.VideoChannel.Actor.Server.host
|
||||
|
||||
return REMOTE_SCHEME.HTTP + '://' + host + path
|
||||
return scheme + '://' + host + path
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue