diff --git a/src/page/dir.lua b/src/page/dir.lua index a8f39e5..b612129 100644 --- a/src/page/dir.lua +++ b/src/page/dir.lua @@ -7,7 +7,7 @@ return { middleware = function(req,res,next) local rootpath = "/" .. app.opts.plugin_diskscan_dirname local urlpath = req.url - local isroot = urlpath == "/" or urlpath:match("^"..rootpath.."[/]?$") + local isroot = urlpath == "/" or urlpath:match("^"..rootpath.."[/]?$") or urlpath == '/index.html' res.items = {} res.template = res.template or 'page/dir.html' local isdir = urlpath:sub(-1) == "/" @@ -62,6 +62,7 @@ return { items = {}, isroot = isroot, referrer = referrer, + req = req, parent=res.parent, template=res.template },{ opts = app.opts }) diff --git a/src/page/header.html b/src/page/header.html index d1bb0d1..e60c3b4 100644 --- a/src/page/header.html +++ b/src/page/header.html @@ -8,7 +8,7 @@ ${opts.plugin_global_header_html} diff --git a/src/page/janusxr.html b/src/page/janusxr.html index d7a4951..6aa3a9e 100644 --- a/src/page/janusxr.html +++ b/src/page/janusxr.html @@ -117,6 +117,36 @@ end} addPortal('parent',5, v, v.url, 0, 0, ' shader_id="defaultportal"', '0 -90 0', '0.2 0.2 0.2') end} + {if isroot then + + local plugins = {} + foreach(app.plugin, function(name,p) + if not tostring(name):match("[0-9]") then table.insert(plugins,name) end + end) + + local embedsrc = EscapeFragment( + "config\n======\n" .. + util.dump({ + plugins = plugins, + host = app.host, + protocol = app.scheme, + convert_assimp_filetypes_in = app.opts.plugin_convert_assimp_filetypes_in, + convert_assimp_filetypes_out = app.opts.plugin_convert_assimp_filetypes_out, + janusxr_portalroom = app.opts.plugin_janusxr_wrap_video, + janusxr_wrap_3dfile = app.opts.plugin_janusxr_wrap_3dfile, + janusxr_wrap_video = app.opts.plugin_janusxr_wrap_video, + janusxr_wrap_aframe = app.opts.plugin_janusxr_wrap_aframe, + janusxr_janusweb_corsproxies = util.split("https://p.janusxr.org https://cors.xrforge.org"," ") + }) + ) + print([[ + + + + + ]]) + end} + {if not defined(item) then print('${janusxr_jml_deco}')