From d42bab5b196a22bb9c4928c105a2ddc67f8908d3 Mon Sep 17 00:00:00 2001 From: Marcel Gansfusz Date: Tue, 4 Nov 2025 14:55:04 +0100 Subject: [PATCH] changed the fetch in js to be relative (no explicite url; just a path); removed version from docker compose --- app/static/app.js | 4 ++-- app/static/autocomplete.js | 2 +- compose.yml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/static/app.js b/app/static/app.js index 0c56705..41bd5f5 100644 --- a/app/static/app.js +++ b/app/static/app.js @@ -295,7 +295,7 @@ async function submitForm(formData) { upload_status.innerText = "Censoring Page " + data.page + "/" + data.pages; }); - const response = await fetch(window.location + "submit", { + const response = await fetch("/submit/", { method: "POST", body: formData, }); @@ -338,7 +338,7 @@ function uploadPdf(eve) { } async function uploadFile(formData) { try { - const response = await fetch(window.location + "uploadfile", { + const response = await fetch("/uploadfile/", { method: "POST", body: formData, }); diff --git a/app/static/autocomplete.js b/app/static/autocomplete.js index e3f04fc..6544dff 100644 --- a/app/static/autocomplete.js +++ b/app/static/autocomplete.js @@ -1,4 +1,4 @@ -var url = window.location + "search/"; +var url = "/search/"; var lid = null; var pid = null; var activeAutocompletion = null; diff --git a/compose.yml b/compose.yml index 48f3172..e7042ce 100644 --- a/compose.yml +++ b/compose.yml @@ -1,4 +1,3 @@ -version: "3" services: app: container_name: python-app