Software / code / prosody-modules
Diff
mod_register_apps/mod_register_apps.lua @ 6263:10a1016d1c3a
Merge update
| author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
|---|---|
| date | Sun, 01 Jun 2025 11:43:16 +0700 |
| parent | 6230:8c98b1dd1ad3 |
line wrap: on
line diff
--- a/mod_register_apps/mod_register_apps.lua Sun Jun 01 11:41:42 2025 +0700 +++ b/mod_register_apps/mod_register_apps.lua Sun Jun 01 11:43:16 2025 +0700 @@ -1,13 +1,6 @@ -- luacheck: ignore 631 module:depends("http"); -local http_files -if prosody.process_type then - -- Prosody >= 0.12 - http_files = require "net.http.files"; -else - -- Prosody <= 0.11 - http_files = module:depends "http_files"; -end +local http_files = require "net.http.files"; local app_config = module:get_option("site_apps", { { @@ -225,7 +218,7 @@ module:provides("http", { route = { - ["GET /assets/*"] = http_files and http_files.serve({ + ["GET /assets/*"] = http_files.serve({ path = module:get_directory().."/assets"; mime_map = mime_map; });