diff --git a/controller/app/index.js b/controller/app/index.js index a301afd..7e8bd50 100644 --- a/controller/app/index.js +++ b/controller/app/index.js @@ -67,13 +67,13 @@ $().ready(() => { $("#botlist").hide() $("#shutdownConfirm").on('click', confirmShutdown) - fetch("./regions", { method: "GET", headers: getHeaders()}).then((response) => response.json()).then(gotRegions) + fetch(getUrl("./regions"), { method: "GET",mode: 'cors', headers: getHeaders()}).then((response) => response.json()).then(gotRegions) syncData() }) function syncData() { - fetch("./tasks", { method: "GET", headers: getHeaders()}).then((response) => response.json()).then(gotTasks) + fetch(getUrl("./tasks"), { method: "GET", mode: 'cors', headers: getHeaders()}).then((response) => response.json()).then(gotTasks) } function operate(val, row) { @@ -143,7 +143,7 @@ function gotRegions(data) { $("#regionList .list-group-item").removeClass("active") $(this).addClass("active") currentRegion = regionList[reg] - fetch(`./regions/${regionList[reg]}`, { method: "GET", headers: getHeaders()}).then((response) => response.json()).then(gotDaemons) + fetch(getUrl(`./regions/${regionList[reg]}`), { method: "GET", mode: 'cors', headers: getHeaders()}).then((response) => response.json()).then(gotDaemons) }) .appendTo($("#regionlist")); $('