From b24d7fe90d99076d104dd255383f94d052eb4898 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 9 Jul 2021 21:55:14 +0200 Subject: mod_http_errors: Add a Prosody logo to root page --- plugins/mod_http_errors.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_http_errors.lua b/plugins/mod_http_errors.lua index 693a97ad..b5d0f7fb 100644 --- a/plugins/mod_http_errors.lua +++ b/plugins/mod_http_errors.lua @@ -85,6 +85,15 @@ module:hook("http-message", function (event) return render(html, event); end); +local icon = [[ + + + + + + +]]; + -- Something nicer shown instead of 404 at the root path, if nothing else handles this path module:hook_object_event(server, "http-error", function (event) local request, response = event.request, event.response; @@ -92,6 +101,7 @@ module:hook_object_event(server, "http-error", function (event) response.headers.content_type = "text/html; charset=utf-8"; local message = messages["/"]; return render(html, { + icon_raw = icon, title = "Prosody is running!"; message = message[math.random(#message)]; }); -- cgit v1.2.3