1
0
Fork 0
mirror of https://github.com/bjc/prosody.git synced 2025-04-06 14:47:37 +03:00

mod_bosh: Make into a normal module (fixes )

This commit is contained in:
Kim Alvefur 2017-12-13 15:24:02 +01:00
parent 6013ca9e24
commit c468196063

View file

@ -6,8 +6,6 @@
-- COPYING file in the source package for more information.
--
module:set_global(); -- Global module
local hosts = _G.hosts;
local new_xmpp_stream = require "util.xmppstream".new;
local sm = require "core.sessionmanager";
@ -512,17 +510,15 @@ local GET_response = {
</body></html>]];
};
function module.add_host(module)
module:depends("http");
module:provides("http", {
default_path = "/http-bind";
route = {
["GET"] = GET_response;
["GET /"] = GET_response;
["OPTIONS"] = handle_OPTIONS;
["OPTIONS /"] = handle_OPTIONS;
["POST"] = handle_POST;
["POST /"] = handle_POST;
};
});
end
module:depends("http");
module:provides("http", {
default_path = "/http-bind";
route = {
["GET"] = GET_response;
["GET /"] = GET_response;
["OPTIONS"] = handle_OPTIONS;
["OPTIONS /"] = handle_OPTIONS;
["POST"] = handle_POST;
["POST /"] = handle_POST;
};
});