Fix: 2.1.0 was in fact correct... Did not work on my preprod env because of... a Livebox bug...

This commit is contained in:
John Livingston 2021-05-06 21:00:42 +02:00
parent fec219a909
commit e91d378e5c
2 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -1,12 +1,10 @@
async function getProsodyDomain (options: RegisterServerOptions): Promise<string> {
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 {