diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-09 21:55:14 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-09 21:55:14 +0200 |
commit | b24d7fe90d99076d104dd255383f94d052eb4898 (patch) | |
tree | b0c04bed2bfef14c30ac1df289e9d4aa582cefc6 | |
parent | fa1e274fb44088cef7c66df97073500e38b903c4 (diff) | |
download | prosody-b24d7fe90d99076d104dd255383f94d052eb4898.tar.gz prosody-b24d7fe90d99076d104dd255383f94d052eb4898.zip |
mod_http_errors: Add a Prosody logo to root page
-rw-r--r-- | plugins/mod_http_errors.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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 = [[ +<svg xmlns="http://www.w3.org/2000/svg" height="0.7em" viewBox="0 0 480 480" width="0.7em"> +<rect fill="#6197df" height="220" rx="60" ry="60" width="220" x="10" y="10"></rect> +<rect fill="#f29b00" height="220" rx="60" ry="60" width="220" x="10" y="240"></rect> +<rect fill="#f29b00" height="220" rx="60" ry="60" width="220" x="240" y="10"></rect> +<rect fill="#6197df" height="220" rx="60" ry="60" width="220" x="240" y="240"></rect> +</svg> +]]; + -- 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)]; }); |