debug.html: fix: cannot open files when ssl is disabled

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Icc948a7ba39be1d4deb5178dd5a58a7708e7dbea
This commit is contained in:
Rash419 2021-11-08 12:22:41 +05:30 committed by Rashesh Padia
parent e7ad60ea42
commit f764ef97d2

View file

@ -24,7 +24,7 @@
function constructWopiUrl() {
var wopiUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + "?";
wopiUrl = wopiUrl.replace("debug.html", "loleaflet.html");
var wopiSrc = "https://localhost:9980/wopi/files/" + encodeURIComponent(window.location.search.substring(window.location.search.indexOf("=")+2));
var wopiSrc = window.location.protocol + "//" + window.location.host + "/wopi/files/" + encodeURIComponent(window.location.search.substring(window.location.search.indexOf("=")+2));
wopiUrl = wopiUrl + "WOPISrc=" + wopiSrc;
return wopiUrl
}