Implemented dynamic host finding

This commit is contained in:
2023-02-03 12:12:17 +01:00
parent e50a9dd95a
commit e0f7c48801
4 changed files with 20 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
$(document).ready( function() {
document.getElementsByName("iframe")[0].src =
window.location.protocol + "//" + window.location.hostname + ":8097";
document.getElementById("rest-mock").href =
window.location.protocol + "//" + window.location.hostname + ":8097";
console.log("DONE")
});

View File

@@ -106,7 +106,7 @@ function performRequest(text, checkXML, checkTransform){
async function restRequest(text) {
const escapeChar = "specialEscapeChar";
// const addr = "http://localhost:8081/" + text;
const addr = "http://tools.zipper.release11.com" + text;
const addr = window.location.protocol + "//" + window.location.hostname + ":8081/" + text;
var xmlData = document.getElementById("xmlArea").value.trim();
var transformData = document.getElementById("transformArea").value.trim();