Changeset

3573:5dd505c39c4b

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