aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-22 00:02:16 +0200
committerKim Alvefur <zash@zash.se>2018-09-22 00:02:16 +0200
commiteab76309e8547d51cdd1e0c38e7222ade4c0848d (patch)
treea23aa58cce4dc0e96c1d34b1792c9377c6dcf620 /plugins
parentc2562cb46841145873af3e61ec09747e9b013dc6 (diff)
downloadprosody-eab76309e8547d51cdd1e0c38e7222ade4c0848d.tar.gz
prosody-eab76309e8547d51cdd1e0c38e7222ade4c0848d.zip
mod_websocket: Serve HTTP in global context
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_websocket.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index d301088e..f981e871 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -315,16 +315,17 @@ end
module:hook("c2s-read-timeout", keepalive, -0.9);
+module:depends("http");
+module:provides("http", {
+ name = "websocket";
+ default_path = "xmpp-websocket";
+ route = {
+ ["GET"] = handle_request;
+ ["GET /"] = handle_request;
+ };
+});
+
function module.add_host(module)
- module:depends("http");
- module:provides("http", {
- name = "websocket";
- default_path = "xmpp-websocket";
- route = {
- ["GET"] = handle_request;
- ["GET /"] = handle_request;
- };
- });
module:hook("c2s-read-timeout", keepalive, -0.9);
if cross_domain ~= true then