aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_file_share.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-02-21 06:49:11 +0100
committerKim Alvefur <zash@zash.se>2021-02-21 06:49:11 +0100
commit900fe6a1cb251c24e3a8661bee49ba2da38a4abc (patch)
treeffa04f2dd68fe38625820a6c590dc08ff65970de /plugins/mod_http_file_share.lua
parent49d6a7a91f9af9009db2279736d842603d2f1106 (diff)
downloadprosody-900fe6a1cb251c24e3a8661bee49ba2da38a4abc.tar.gz
prosody-900fe6a1cb251c24e3a8661bee49ba2da38a4abc.zip
mod_http_file_share: Return a message from the base URL
Diffstat (limited to 'plugins/mod_http_file_share.lua')
-rw-r--r--plugins/mod_http_file_share.lua9
1 files changed, 9 insertions, 0 deletions
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