Software /
code /
prosody
Changeset
9378:a6f54df39624
mod_websocket: Serve HTTP in global context
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Sep 2018 00:02:16 +0200 |
parents | 9377:f2013233e20d |
children | 9379:866cba3689f4 |
files | plugins/mod_websocket.lua |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_websocket.lua Sat Sep 22 00:01:21 2018 +0200 +++ b/plugins/mod_websocket.lua Sat Sep 22 00:02:16 2018 +0200 @@ -315,16 +315,17 @@ 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