Software /
code /
prosody-modules
File
mod_http_libjs/mod_http_libjs.lua @ 4493:89571a20196f
mod_rest/openapi: Describe 'version' endpoint in more detail
Use the limited xml "support" in openapi to show both forms of the
response.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Mar 2021 00:44:15 +0100 |
parent | 4095:de2390d6bbe4 |
child | 4604:f0efbb0b0b5b |
line wrap: on
line source
local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css", js = "application/javascript", }; local serve; if not pcall(function () local http_files = require "net.http.files"; serve = http_files.serve; end) then serve = module:depends"http_files".serve; end local libjs_path = module:get_option_string("libjs_path", "/usr/share/javascript"); module:provides("http", { default_path = "/share"; route = { ["GET /*"] = serve({ path = libjs_path, mime_map = mime_map }); } });