Changeset

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
parents 11393:e6122e6a40a0
children 11395:d336b28b4002
files plugins/mod_http_file_share.lua
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
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