浏览代码

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

master
Aaron van Meerten 5 年前
父节点
当前提交
82b1408454
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      resources/prosody-plugins/mod_jibri_queue_component.lua

+ 4
- 1
resources/prosody-plugins/mod_jibri_queue_component.lua 查看文件

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

正在加载...
取消
保存