Comparison

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
comparison
equal deleted inserted replaced
11393:e6122e6a40a0 11394:420787340339
433 module:provides("http", { 433 module:provides("http", {
434 streaming_uploads = true; 434 streaming_uploads = true;
435 route = { 435 route = {
436 ["PUT /*"] = handle_upload; 436 ["PUT /*"] = handle_upload;
437 ["GET /*"] = handle_download; 437 ["GET /*"] = handle_download;
438 ["GET /"] = function (event)
439 return prosody.events.fire_event("http-message", {
440 response = event.response;
441 ---
442 title = "Prosody HTTP Upload endpoint";
443 message = "This is where files will be uploaded to, and served from.";
444 warning = not (event.request.secure) and "This endpoint is not considered secure!" or nil;
445 }) or "This is the Prosody HTTP Upload endpoint.";
446 end
438 } 447 }
439 }); 448 });
440 end 449 end