I am creating an extension in tableau with custom html file, this file is stored in tableau server
Points :
I have created one custom html file and stored in tableau server . file is stored in = tableau server[hostname : st_de_uat ] path is e.g [/data/tabsvc/httpd/htdocs/testreport.html
we then can load this file using directaccess link with : uat.tableau.com/testreport.html
we then load this file in our tableau dashboard as an extension using .trex file . This will load. however, the script developed dynamically call the url is using var dynamicURL = window.top.location.href;
Assuming on tableau direct access, if a page is loaded as uat.tableau.com/testreport/maindashboard . when we do a console log on dynamicURL variable , this will return as uat.tableau.com/testreport/maindashboard
Now , web ui server are loading uat.tableau.com/testreport/maindashboard into their website. when this is loaded . window.top.location.href is returning error as DOMException cross origin , i believed this is due of both having the different host, hence it not allowing to call the parent url from the child page.
Main objective is to call uat.tableau.com/testreport/maindashboard from the parent web ui. is this possible ?
For illustration purpose for better understanding on the flow of the objective
testreport.html is stored in url in box1 . when .html is loaded as an iframe , this will return on console.log as www.tableau.com/testreport/maindashboard
box2 is calling box1 with a trusted token developed by another team to display the page on the web ui. using the same testreport.html , window.top.location.href will have error as CrossOrigin. even if window.top.location.href works , this will return as uat.ui.tableau.com , instead i should only call www.tableau.com/testreport/maindashboard . I have tried using document.referrer but this does not return the same as the url in box1