diff --git a/public/script.js b/public/script.js index 16639d0..84d1bf8 100644 --- a/public/script.js +++ b/public/script.js @@ -73,7 +73,7 @@ form.addEventListener("submit", (e) => { }; showLoading(); - fetch("http://localhost:3000/api/v1/files/pdf", requestOptions) + fetch(`${location.origin}/api/v1/files/pdf`, requestOptions) .then((response) => response.json()) .then((result) => showResults(result)) .catch((error) => showErrors(error));