Переглянути джерело

FEAT: jibri queue clear asap cache for token util on config reload

j8
Aaron van Meerten 5 роки тому
джерело
коміт
82b1408454

+ 4
- 1
resources/prosody-plugins/mod_jibri_queue_component.lua Переглянути файл

@@ -142,6 +142,9 @@ local function reload_config()
142 142
     module:log("info", "Reloading configuration for jibri queue component");
143 143
     local config_success = load_config();
144 144
 
145
+    -- clear ASAP public key cache on config reload
146
+    token_util:clear_asap_cache();
147
+
145 148
     if not config_success then
146 149
         log("error", "Unsuccessful reconfiguration, jibri queue component may misbehave");
147 150
     end
@@ -485,7 +488,7 @@ function handle_update_jibri_queue(event)
485 488
         local prefixStart, prefixEnd = token:find("Bearer ");
486 489
         if prefixStart ~= 1 then
487 490
             module:log("error", "REST event: Invalid authorization header format. The header must start with the string 'Bearer '");
488
-            return 403
491
+            return { status_code = 403; };
489 492
         end
490 493
         token = token:sub(prefixEnd + 1);
491 494
     end

Завантаження…
Відмінити
Зберегти