Revert getProsodyDomain. Broken when not on localhot.
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
async function getProsodyDomain (options: RegisterServerOptions): Promise<string> {
|
||||
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]
|
||||
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]
|
||||
}
|
||||
|
||||
export {
|
||||
|
Reference in New Issue
Block a user