aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r--plugins/mod_bosh.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index c337c03c..7bf241cd 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -543,13 +543,17 @@ local function GET_response(event)
}) or "This is the Prosody BOSH endpoint.";
end
-module:depends("http");
-module:provides("http", {
- default_path = "/http-bind";
- route = {
- ["GET"] = GET_response;
- ["GET /"] = GET_response;
- ["POST"] = handle_POST;
- ["POST /"] = handle_POST;
- };
-});
+function module.add_host(module)
+ module:depends("http");
+ module:provides("http", {
+ default_path = "/http-bind";
+ route = {
+ ["GET"] = GET_response;
+ ["GET /"] = GET_response;
+ ["POST"] = handle_POST;
+ ["POST /"] = handle_POST;
+ };
+ });
+end
+
+module:add_host();