Przeglądaj źródła

FEAT: validate keys at specific URL for jibri queue

Provide region value in POST to jibri-queue service
j8
Aaron van Meerten 5 lat temu
rodzic
commit
ad44558153

+ 11
- 0
resources/prosody-plugins/mod_jibri_queue_component.lua Wyświetl plik

33
 end
33
 end
34
 local token_util = module:require "token/util".new(parentCtx);
34
 local token_util = module:require "token/util".new(parentCtx);
35
 
35
 
36
+local ASAPKeyServer
37
+    = module:get_option_string("asap_key_server");
38
+
39
+if ASAPKeyServer then
40
+    module:log("info", "ASAP Public Key URL %s", ASAPKeyServer);
41
+    token_util:set_asap_key_server(ASAPKeyServer);
42
+end
36
 
43
 
37
 local ASAPKeyPath
44
 local ASAPKeyPath
38
     = module:get_option_string("asap_key_path", '/etc/prosody/certs/asap.key');
45
     = module:get_option_string("asap_key_path", '/etc/prosody/certs/asap.key');
57
 local queueServiceURL
64
 local queueServiceURL
58
     = module:get_option_string("jibri_queue_url");
65
     = module:get_option_string("jibri_queue_url");
59
 
66
 
67
+local JibriRegion
68
+    = module:get_option_string("jibri_region");
69
+
60
 if queueServiceURL == nil then
70
 if queueServiceURL == nil then
61
     log("error", "No jibri_queue_url specified. No service to contact!");
71
     log("error", "No jibri_queue_url specified. No service to contact!");
62
     return;
72
     return;
200
         ["participant"] = participant,
210
         ["participant"] = participant,
201
         ["externalApiUrl"] = external_api_url.."/jibriqueue/update",
211
         ["externalApiUrl"] = external_api_url.."/jibriqueue/update",
202
         ["requestId"] = requestId,
212
         ["requestId"] = requestId,
213
+        ["region"] = JibriRegion,
203
     }
214
     }
204
     module:log("debug","Sending event %s",inspect(out_event));
215
     module:log("debug","Sending event %s",inspect(out_event));
205
 
216
 

Ładowanie…
Anuluj
Zapisz