diff --git a/Backend/mocked-services/src/main/resources/static/html/mock.html b/Backend/mocked-services/src/main/resources/static/html/mock.html index 79f52b4..f597720 100644 --- a/Backend/mocked-services/src/main/resources/static/html/mock.html +++ b/Backend/mocked-services/src/main/resources/static/html/mock.html @@ -8,6 +8,7 @@ +
diff --git a/Backend/mocked-services/src/main/resources/static/js/dyn_host.js b/Backend/mocked-services/src/main/resources/static/js/dyn_host.js new file mode 100644 index 0000000..14f19ae --- /dev/null +++ b/Backend/mocked-services/src/main/resources/static/js/dyn_host.js @@ -0,0 +1,25 @@ +// $(document).ready( function() { +// console.log("Here") +// let links = document.getElementsByTagName("link") +// for (let e in links) { +// let oldStr = links[e].href.split("/") +// console.log(oldStr) +// let endpoint = oldStr.slice(3).join() +// console.log(endpoint) +// e.href = window.location.protocol + "//" + window.location.hostname + "/" + endpoint +// } +// }); + +$(document).ready( function() { + console.log("Here") + let links = document.getElementsByTagName("link") + for (let i = 0; i < links.length; i++) { + let oldStr = links[i].href.split("/") + console.log(oldStr) + let endpoint = oldStr.slice(3).join("/") + console.log(endpoint) + links[i].href = window.location.protocol + "//" + window.location.hostname + ":8086/" + endpoint + } + +}); +