From 5575628e994f60d5336902e839905eb8c630fde4 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Sun, 2 May 2021 16:55:01 +0200 Subject: [PATCH] Moving the prosody virtualhost to anon.localhost. --- server/lib/prosody/config/content.ts | 6 +++++- server/lib/routers/webchat.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/lib/prosody/config/content.ts b/server/lib/prosody/config/content.ts index be74d30c..f7f9af0d 100644 --- a/server/lib/prosody/config/content.ts +++ b/server/lib/prosody/config/content.ts @@ -107,7 +107,7 @@ class ProsodyConfigContent { this.paths = paths this.global = new ProsodyConfigGlobal() this.log = '' - this.anon = new ProsodyConfigVirtualHost('localhost') + this.anon = new ProsodyConfigVirtualHost('anon.localhost') this.muc = new ProsodyConfigComponent('muc', 'room.localhost') this.global.set('daemonize', false) @@ -181,6 +181,10 @@ class ProsodyConfigContent { useMucHttpDefault (url: string): void { this.muc.add('modules_enabled', 'muc_http_defaults') this.muc.add('muc_create_api_url', url) + + // restrict_room_creation: we can override the 'local' value. + // Indeed, when muc_http_default is used, room creation will be managed by api. + this.muc.set('restrict_room_creation', false) } setArchive (duration: string): void { diff --git a/server/lib/routers/webchat.ts b/server/lib/routers/webchat.ts index cab7599c..0970993a 100644 --- a/server/lib/routers/webchat.ts +++ b/server/lib/routers/webchat.ts @@ -32,7 +32,7 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise