add headers lua runtime support

This commit is contained in:
2025-08-05 23:15:13 +03:00
parent c734779b69
commit 251e580e8a
6 changed files with 115 additions and 34 deletions

View File

@@ -2,7 +2,9 @@
local session = require("internal.session")
if session.request.params.about then
local params = session.request.params.get()
if params.about then
session.response.result = {
description = "Returns a list of available methods",
params = {
@@ -48,7 +50,7 @@ local function scanDirectory(basePath, targetPath)
end
local basePath = "com"
local layer = session.request and session.request.params.layer and session.request.params.layer:gsub(">", "/") or nil
local layer = params.layer and params.layer:gsub(">", "/") or nil
session.response.result = {
answer = layer and scanDirectory(basePath, layer) or scanDirectory(basePath, "")