From e91d378e5cac1b2c8f53b4bf49219fff6030ae07 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 6 May 2021 21:00:42 +0200 Subject: [PATCH] Fix: 2.1.0 was in fact correct... Did not work on my preprod env because of... a Livebox bug... --- CHANGELOG.md | 6 ++++-- server/lib/prosody/config/domain.ts | 14 ++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1fda828..9adf7070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,15 @@ # Changelog +## v2.1.3 + +* Fix: 2.1.0 was in fact correct... Did not work on my preprod env because of... a Livebox bug... + ## v2.1.2 * Fix: revert 2.1.1, and revert using the real domain for prosody ## v2.1.1 -### Fixes - * Fix bad proxy settings when not working on localhost ## v2.1.0 diff --git a/server/lib/prosody/config/domain.ts b/server/lib/prosody/config/domain.ts index a3f1e5af..42b897f8 100644 --- a/server/lib/prosody/config/domain.ts +++ b/server/lib/prosody/config/domain.ts @@ -1,12 +1,10 @@ async function getProsodyDomain (options: RegisterServerOptions): Promise { - return 'localhost' - // FIXME: there is something that is not working with this configuration. - // const url = options.peertubeHelpers.config.getWebserverUrl() - // const matches = url.match(/^https?:\/\/([^:/]*)(:\d+)?(\/|$)/) - // if (!matches) { - // throw new Error(`Cant get a domain name from url '${url}'`) - // } - // return matches[1] + const url = options.peertubeHelpers.config.getWebserverUrl() + const matches = url.match(/^https?:\/\/([^:/]*)(:\d+)?(\/|$)/) + if (!matches) { + throw new Error(`Cant get a domain name from url '${url}'`) + } + return matches[1] } export {