From 900fe6a1cb251c24e3a8661bee49ba2da38a4abc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 21 Feb 2021 06:49:11 +0100 Subject: mod_http_file_share: Return a message from the base URL --- plugins/mod_http_file_share.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index 1ce5a8bb..69627654 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -435,6 +435,15 @@ module:provides("http", { 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 -- cgit v1.2.3