Browse Source

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

master
Aaron van Meerten 5 years ago
parent
commit
82b1408454
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      resources/prosody-plugins/mod_jibri_queue_component.lua

+ 4
- 1
resources/prosody-plugins/mod_jibri_queue_component.lua View File

142
     module:log("info", "Reloading configuration for jibri queue component");
142
     module:log("info", "Reloading configuration for jibri queue component");
143
     local config_success = load_config();
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
     if not config_success then
148
     if not config_success then
146
         log("error", "Unsuccessful reconfiguration, jibri queue component may misbehave");
149
         log("error", "Unsuccessful reconfiguration, jibri queue component may misbehave");
147
     end
150
     end
485
         local prefixStart, prefixEnd = token:find("Bearer ");
488
         local prefixStart, prefixEnd = token:find("Bearer ");
486
         if prefixStart ~= 1 then
489
         if prefixStart ~= 1 then
487
             module:log("error", "REST event: Invalid authorization header format. The header must start with the string 'Bearer '");
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
         end
492
         end
490
         token = token:sub(prefixEnd + 1);
493
         token = token:sub(prefixEnd + 1);
491
     end
494
     end

Loading…
Cancel
Save