plugins/mod_http.lua
changeset 9339 9e8d7d461c7d
parent 9338 2dc7490899ae
child 9341 9beb767295d4
equal deleted inserted replaced
9338:2dc7490899ae 9339:9e8d7d461c7d
    36 		return nil;
    36 		return nil;
    37 	end
    37 	end
    38 	if app_path == "/" and path:sub(1,1) == "/" then
    38 	if app_path == "/" and path:sub(1,1) == "/" then
    39 		app_path = "";
    39 		app_path = "";
    40 	end
    40 	end
    41 	return method:upper().." "..host..app_path..path;
    41 	if host == "*" then
       
    42 		return method:upper().." "..app_path..path;
       
    43 	else
       
    44 		return method:upper().." "..host..app_path..path;
       
    45 	end
    42 end
    46 end
    43 
    47 
    44 local function get_base_path(host_module, app_name, default_app_path)
    48 local function get_base_path(host_module, app_name, default_app_path)
    45 	return (normalize_path(host_module:get_option("http_paths", {})[app_name] -- Host
    49 	return (normalize_path(host_module:get_option("http_paths", {})[app_name] -- Host
    46 		or module:get_option("http_paths", {})[app_name] -- Global
    50 		or module:get_option("http_paths", {})[app_name] -- Global