Issue #3122 - Put base paths in the json viewer client deps.
The dependency modules are requested early. Seems CSP can block baseURL on these networking requests, so add the base manually to the resource paths to prevent network requests before the html base element is resolved and active.
This commit is contained in:
1 file changed
+2
-2
@@ -210,10 +210,10 @@ function initialHTML(doc) {
|
||||
let style = doc.createElement("link");
|
||||
style.rel = "stylesheet";
|
||||
style.type = "text/css";
|
||||
style.href = "css/main.css";
|
||||
style.href = base.href +"css/main.css";
|
||||
|
||||
let script = doc.createElement("script");
|
||||
script.src = "lib/require.js";
|
||||
script.src = base.href + "lib/require.js";
|
||||
script.dataset.main = "viewer-config";
|
||||
script.defer = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user