Changeset

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
parents 9335:2dc7490899ae
children 9337:5d6b252bc36f
files plugins/mod_http.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
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)