Przeglądaj źródła

fix: Fixes handling tenant in util and lobby.

master
damencho 4 lat temu
rodzic
commit
a39f2aebd9

+ 9
- 8
doc/debian/jitsi-meet/jitsi-meet.example Wyświetl plik

35
     ssl_session_tickets off;
35
     ssl_session_tickets off;
36
 
36
 
37
     add_header Strict-Transport-Security "max-age=63072000" always;
37
     add_header Strict-Transport-Security "max-age=63072000" always;
38
+    set $prefix "";
38
 
39
 
39
     ssl_certificate /etc/jitsi/meet/jitsi-meet.example.com.crt;
40
     ssl_certificate /etc/jitsi/meet/jitsi-meet.example.com.crt;
40
     ssl_certificate_key /etc/jitsi/meet/jitsi-meet.example.com.key;
41
     ssl_certificate_key /etc/jitsi/meet/jitsi-meet.example.com.key;
76
 
77
 
77
     # BOSH
78
     # BOSH
78
     location = /http-bind {
79
     location = /http-bind {
79
-        proxy_pass       http://localhost:5280/http-bind;
80
+        proxy_pass http://127.0.0.1:5280/http-bind?prefix=$prefix&$args;
80
         proxy_set_header X-Forwarded-For $remote_addr;
81
         proxy_set_header X-Forwarded-For $remote_addr;
81
         proxy_set_header Host $http_host;
82
         proxy_set_header Host $http_host;
82
     }
83
     }
125
         alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
126
         alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
126
     }
127
     }
127
 
128
 
128
-    # Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
129
-    location ~ ^/([^/?&:'"]+)/(.*)$ {
130
-        set $subdomain "$1.";
131
-        set $subdir "$1/";
132
-        rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
133
-    }
134
-
135
     # BOSH for subdomains
129
     # BOSH for subdomains
136
     location ~ ^/([^/?&:'"]+)/http-bind {
130
     location ~ ^/([^/?&:'"]+)/http-bind {
137
         set $subdomain "$1.";
131
         set $subdomain "$1.";
149
 
143
 
150
         rewrite ^/(.*)$ /xmpp-websocket;
144
         rewrite ^/(.*)$ /xmpp-websocket;
151
     }
145
     }
146
+
147
+    # Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
148
+    location ~ ^/([^/?&:'"]+)/(.*)$ {
149
+        set $subdomain "$1.";
150
+        set $subdir "$1/";
151
+        rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
152
+    }
152
 }
153
 }

+ 3
- 3
resources/prosody-plugins/mod_muc_lobby_rooms.lua Wyświetl plik

40
 local NOTIFY_LOBBY_ACCESS_DENIED = 'LOBBY-ACCESS-DENIED';
40
 local NOTIFY_LOBBY_ACCESS_DENIED = 'LOBBY-ACCESS-DENIED';
41
 
41
 
42
 local util = module:require "util";
42
 local util = module:require "util";
43
+local get_room_by_name_and_subdomain = util.get_room_by_name_and_subdomain;
43
 local is_healthcheck_room = util.is_healthcheck_room;
44
 local is_healthcheck_room = util.is_healthcheck_room;
44
 local presence_check_status = util.presence_check_status;
45
 local presence_check_status = util.presence_check_status;
45
 
46
 
207
         local session, reply, node = event.origin, event.reply, event.node;
208
         local session, reply, node = event.origin, event.reply, event.node;
208
         if node == LOBBY_IDENTITY_TYPE
209
         if node == LOBBY_IDENTITY_TYPE
209
             and session.jitsi_web_query_room
210
             and session.jitsi_web_query_room
210
-            and main_muc_service
211
             and check_display_name_required then
211
             and check_display_name_required then
212
-            local room = main_muc_service.get_room_from_jid(
213
-                jid_bare(session.jitsi_web_query_room .. '@' .. main_muc_component_config));
212
+            local room = get_room_by_name_and_subdomain(session.jitsi_web_query_room, session.jitsi_web_query_prefix);
213
+
214
             if room and room._data.lobbyroom then
214
             if room and room._data.lobbyroom then
215
                 reply:tag('feature', { var = DISPLAY_NAME_REQUIRED_FEATURE }):up();
215
                 reply:tag('feature', { var = DISPLAY_NAME_REQUIRED_FEATURE }):up();
216
             end
216
             end

+ 1
- 1
resources/prosody-plugins/util.lib.lua Wyświetl plik

125
 
125
 
126
     -- if there is a subdomain we are in multidomain mode and that subdomain is not our main host
126
     -- if there is a subdomain we are in multidomain mode and that subdomain is not our main host
127
     if subdomain and subdomain ~= "" and subdomain ~= muc_domain_base then
127
     if subdomain and subdomain ~= "" and subdomain ~= muc_domain_base then
128
-        room_address = "["..subdomain.."]"..room_address;
128
+        room_address = jid.join("["..subdomain.."]"..room_name, muc_domain);
129
     else
129
     else
130
         room_address = jid.join(room_name, muc_domain);
130
         room_address = jid.join(room_name, muc_domain);
131
     end
131
     end

Ładowanie…
Anuluj
Zapisz