Changeset

3575:00bdecb12779

mod_http_pep_avatar: Return a message instead of 404 for base path
author Kim Alvefur <zash@zash.se>
date Sun, 05 May 2019 09:22:30 +0200
parents 3574:f478e325529e
children 3576:1396ce148073
files mod_http_pep_avatar/mod_http_pep_avatar.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_pep_avatar/mod_http_pep_avatar.lua	Sun May 05 09:21:25 2019 +0200
+++ b/mod_http_pep_avatar/mod_http_pep_avatar.lua	Sun May 05 09:22:30 2019 +0200
@@ -12,6 +12,10 @@
 module:provides("http", {
 	route = {
 		["GET /*"] = function (event, user)
+			if user == "" then
+				return [[<h1>Hello from mod_http_pep_avatar</h1><p>This module provides access to public avatars of local users.</p>]];
+			end;
+
 			local request, response = event.request, event.response;
 			local actor = request.ip;