Fixed bug with content-type of request

This commit is contained in:
2023-05-22 13:47:53 +02:00
parent b301008c3f
commit b496b7bbc6
2 changed files with 4 additions and 2 deletions

View File

@@ -80,7 +80,6 @@ function showHeadersHistory(element){
async function formatJSON(json) { async function formatJSON(json) {
const backend = "java"; const backend = "java";
const address = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/json/formatting"; const address = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/json/formatting";
console.log("formatJSON");
var init = { var init = {
body: json, body: json,
@@ -102,7 +101,6 @@ async function formatJSON(json) {
async function formatXML(xml) { async function formatXML(xml) {
const backend = "libxml"; const backend = "libxml";
const address = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/prettify"; const address = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/prettify";
console.log("formatXML");
var data = { var data = {
data: xml, data: xml,
process: "", process: "",

View File

@@ -14,14 +14,18 @@ server {
location /java/ { location /java/ {
proxy_pass http://xmltools-backend:8081/; proxy_pass http://xmltools-backend:8081/;
proxy_set_header Host $host;
} }
location /libxml/ { location /libxml/ {
proxy_pass http://xmltools-libxml-backend/; proxy_pass http://xmltools-libxml-backend/;
proxy_set_header Host $host;
} }
location /mock/ { location /mock/ {
proxy_pass http://xmltools-mocked-services:8097/; proxy_pass http://xmltools-mocked-services:8097/;
proxy_set_header Host $host;
proxy_set_header Content-Type $http_content_type;
} }
#error_page 404 /404.html; #error_page 404 /404.html;