diff --git a/zhetic-poc/js/catalog.js b/zhetic-poc/js/catalog.js index b7b938f..137988f 100644 --- a/zhetic-poc/js/catalog.js +++ b/zhetic-poc/js/catalog.js @@ -1,7 +1,7 @@ function load() { $.ajax({ dataType: "json", - url: "https://"+window.location.hostname+"/db.json", + url: "/db.json", headers: { "Accept": "application/json"}, success: function (res) { let strCatalog = ""; diff --git a/zhetic-poc/js/reader.js b/zhetic-poc/js/reader.js index d3f299a..c2b6f45 100644 --- a/zhetic-poc/js/reader.js +++ b/zhetic-poc/js/reader.js @@ -100,9 +100,16 @@ $(document).ready(function () { let domain = window.location.hostname; $.ajax({ dataType: "json", - url: "https://"+domain+"/db.json", + url: "/db.json", headers: { "Accept": "application/json"}, success: function (res) { + $.ajax({ + dataType: "json", + url: "https://"+domain+"/db.json", + headers: { "Accept": "application/json"}, + success: function (res) { + } + }); pageNo = res[id]["pageNo"]; title = res[id]["title"]; cid = res[id]["cid"];