Diff

plugins/mod_http_file_share.lua @ 11394:420787340339

mod_http_file_share: Return a message from the base URL
author Kim Alvefur <zash@zash.se>
date Sun, 21 Feb 2021 06:49:11 +0100
parent 11375:6b687210975b
child 11398:a1f26d17d70f
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua	Sun Feb 21 06:20:55 2021 +0100
+++ b/plugins/mod_http_file_share.lua	Sun Feb 21 06:49:11 2021 +0100
@@ -435,6 +435,15 @@
 		route = {
 			["PUT /*"] = handle_upload;
 			["GET /*"] = handle_download;
+			["GET /"] = function (event)
+				return prosody.events.fire_event("http-message", {
+						response = event.response;
+						---
+						title = "Prosody HTTP Upload endpoint";
+						message = "This is where files will be uploaded to, and served from.";
+						warning = not (event.request.secure) and "This endpoint is not considered secure!" or nil;
+					}) or "This is the Prosody HTTP Upload endpoint.";
+			end
 		}
 	});
 end