Software /
code /
prosody
Diff
plugins/mod_http.lua @ 5332:5b73ac268a9e
mod_http: Expand $host in http_paths
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 18 Feb 2013 13:12:14 +0100 |
parent | 5230:6f5640375358 |
child | 5374:b62c6cbcb065 |
line wrap: on
line diff
--- 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, };