# HG changeset patch # User Kim Alvefur # Date 1684932569 -7200 # Node ID 6cd768e6ac7c0b71fc21c347e53b5e61936d5af1 # Parent 9c4dc1e6d2c9dca13b2b381e8601137dbf63f1e4 mod_admin_shell: Show internal URL in addition to external in http:list To help with configuring reverse proxies. diff -r 9c4dc1e6d2c9 -r 6cd768e6ac7c plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Wed May 24 14:43:45 2023 +0200 +++ b/plugins/mod_admin_shell.lua Wed May 24 14:49:29 2023 +0200 @@ -1837,9 +1837,10 @@ local print = self.session.print; hosts = array.collect(set.new({ not hosts and "*" or nil }) + get_hosts_set(hosts)):sort(_sort_hosts); local output = format_table({ - { title = "Module", width = "20%" }, - { title = "URL", width = "80%" }, - }, self.session.width); + { title = "Module"; width = "1p" }; + { title = "URL"; width = "3p" }; + { title = "Internal URL"; width = "3p" }; + }, self.session.width); for _, host in ipairs(hosts) do local http_apps = modulemanager.get_items("http-provider", host); @@ -1853,9 +1854,11 @@ print(output()); for _, provider in ipairs(http_apps) do local mod = provider._provided_by; - local url = module:context(host):http_url(provider.name, provider.default_path); + local external = module:context(host):http_url(provider.name, provider.default_path); + local internal = module:context(host):http_url(provider.name, provider.default_path, "internal"); + if external==internal then internal="" end mod = mod and "mod_"..mod or "" - print(output{mod, url}); + print(output{mod, external, internal}); end print(""); end