Software /
code /
prosody
Diff
plugins/mod_http.lua @ 9336:9e8d7d461c7d
mod_http: Hook the host-less event if hooked from a global module
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Sep 2018 21:19:44 +0200 |
parent | 9335:2dc7490899ae |
child | 9338:9beb767295d4 |
line wrap: on
line diff
--- a/plugins/mod_http.lua Fri Sep 21 21:19:41 2018 +0200 +++ b/plugins/mod_http.lua Fri Sep 21 21:19:44 2018 +0200 @@ -38,7 +38,11 @@ if app_path == "/" and path:sub(1,1) == "/" then app_path = ""; end - return method:upper().." "..host..app_path..path; + if host == "*" then + return method:upper().." "..app_path..path; + else + return method:upper().." "..host..app_path..path; + end end local function get_base_path(host_module, app_name, default_app_path)