# HG changeset patch # User Kim Alvefur # Date 1361189534 -3600 # Node ID 5b73ac268a9eaa5533d1d90a119a9fde40417593 # Parent ffa740b4f08dbe36d51a236df1ad65f3e1e492b4 mod_http: Expand $host in http_paths diff -r ffa740b4f08d -r 5b73ac268a9e plugins/mod_http.lua --- a/plugins/mod_http.lua Tue Feb 12 03:24:41 2013 +0100 +++ b/plugins/mod_http.lua Mon Feb 18 13:12:14 2013 +0100 @@ -38,9 +38,10 @@ end local function get_base_path(host_module, app_name, default_app_path) - return normalize_path(host_module:get_option("http_paths", {})[app_name] -- Host + return (normalize_path(host_module:get_option("http_paths", {})[app_name] -- Host or module:get_option("http_paths", {})[app_name] -- Global - or default_app_path); -- Default + or default_app_path)) -- Default + :gsub("%$(%w+)", { host = module.host }); end local ports_by_scheme = { http = 80, https = 443, };