aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 086887fb..2178e2e8 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -47,6 +47,9 @@ end
local function redir_handler(event)
event.response.headers.location = event.request.path.."/";
+ if event.request.url.query then
+ event.response.headers.location = event.response.headers.location .. "?" .. event.request.url.query
+ end
return 301;
end
@@ -117,7 +120,7 @@ function module.add_host(module)
module:log("warn", "App %s added handler twice for '%s', ignoring", app_name, event_name);
end
else
- module:log("error", "Invalid route in %s, %q. See http://prosody.im/doc/developers/http#routes", app_name, key);
+ module:log("error", "Invalid route in %s, %q. See https://prosody.im/doc/developers/http#routes", app_name, key);
end
end
local services = portmanager.get_active_services();