mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
Merge 0.12->trunk
This commit is contained in:
commit
11a3373e89
1 changed files with 7 additions and 3 deletions
|
@ -261,7 +261,9 @@ function module.add_host(module)
|
||||||
apps[event.item.name] = nil;
|
apps[event.item.name] = nil;
|
||||||
for event_name, handlers in pairs(app_handlers) do
|
for event_name, handlers in pairs(app_handlers) do
|
||||||
module:unhook_object_event(server, event_name, handlers.main);
|
module:unhook_object_event(server, event_name, handlers.main);
|
||||||
module:unhook_object_event(server, event_name, handlers.cors);
|
if handlers.cors then
|
||||||
|
module:unhook_object_event(server, event_name, handlers.cors);
|
||||||
|
end
|
||||||
|
|
||||||
if event_name:sub(-2, -1) == "/*" then
|
if event_name:sub(-2, -1) == "/*" then
|
||||||
module:unhook_object_event(server, event_name:sub(1, -3), redir_handler, -1);
|
module:unhook_object_event(server, event_name:sub(1, -3), redir_handler, -1);
|
||||||
|
@ -269,8 +271,10 @@ function module.add_host(module)
|
||||||
module:unhook_object_event(server, event_name:sub(1, -2), redir_handler, -1);
|
module:unhook_object_event(server, event_name:sub(1, -2), redir_handler, -1);
|
||||||
end
|
end
|
||||||
|
|
||||||
local options_event_name = event_name:gsub("^%S+", "OPTIONS");
|
if handlers.options then
|
||||||
module:unhook_object_event(server, options_event_name, handlers.options);
|
local options_event_name = event_name:gsub("^%S+", "OPTIONS");
|
||||||
|
module:unhook_object_event(server, options_event_name, handlers.options);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue