absolute referrer links
This commit is contained in:
parent
dcf90a4205
commit
c083470916
3 changed files with 7 additions and 4 deletions
|
|
@ -84,6 +84,7 @@ end
|
|||
util.getURL = function(url,opts)
|
||||
opts = opts or {}
|
||||
local port = ''
|
||||
if url and url:match("://") then return url end
|
||||
if opts.server then
|
||||
url = url or '/'
|
||||
return 'http://localhost:' .. app.port .. url
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
"virtualgamepad": "./apps/virtualgamepad/virtualgamepad.json",
|
||||
"buttons": "./apps/buttons/buttons.json",
|
||||
"xrmenu": "./apps/xrmenu/xrmenu.json?v=14",
|
||||
"xrfragment": "./apps/xrfragment/xrfragment.json",
|
||||
"xrforge": "./apps/xrforge/xrforge.json",
|
||||
"vfs": "./apps/vfs/vfs.json"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ return {
|
|||
res.parent = parent
|
||||
end
|
||||
if isroot then
|
||||
referrer = app.opts.plugin_federation_parent_url
|
||||
referrer = util.getURL( app.opts.plugin_federation_parent_url )
|
||||
else
|
||||
referrer = v.parent.parent.url
|
||||
referrer = util.getURL( v.parent.parent.url )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -97,7 +97,10 @@ return {
|
|||
and not isMarkupExperience(data.item))
|
||||
then
|
||||
-- update referrer url
|
||||
data.referrer = util.baseURLify(v.view3D and (v.parent.parent and v.parent.parent.url) or v.parent.url)
|
||||
data.referrer = util.getURL(
|
||||
util.baseURLify(v.view3D and (v.parent.parent and v.parent.parent.url) or v.parent.url)
|
||||
)
|
||||
|
||||
data.item = v
|
||||
data.title = data.item.title
|
||||
data.parent = v.parent
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue