diff --git a/backend/src/main/resources/get/cesare.html b/backend/src/main/resources/get/cesare.html
index 0b84847..11e098a 100644
--- a/backend/src/main/resources/get/cesare.html
+++ b/backend/src/main/resources/get/cesare.html
@@ -50,7 +50,7 @@
if(!input) return alert("Inserisci del testo!");
try {
- const risposta = await fetch("http://localhost:8080/api/cesare/cifra", {
+ const risposta = await fetch("/seal/cesare/encrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
// Invia il testo e la CHIAVE (convertita in numero) al server
body: JSON.stringify({ testo: input, chiave: parseInt(chiave) })
@@ -65,7 +65,7 @@
if(!inputCifrato) return alert("Nessun testo da decifrare!");
try {
- const risposta = await fetch("http://localhost:8080/api/cesare/decifra", {
+ const risposta = await fetch("/seal/cesare/decrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ testo: inputCifrato, chiave: parseInt(chiave) })
});
diff --git a/backend/src/main/resources/get/index.html b/backend/src/main/resources/get/index.html
index e648444..acecb3c 100644
--- a/backend/src/main/resources/get/index.html
+++ b/backend/src/main/resources/get/index.html
@@ -36,15 +36,16 @@
-
+
@@ -88,7 +89,7 @@
btn.disabled = true;
try {
- const res = await fetch("http://localhost:8080/seal/rsa/encrypt", {
+ const res = await fetch("/seal/rsa/encrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: plaintext, keysize: parseInt(size) })
});
@@ -127,7 +128,7 @@
btn.disabled = true;
try {
- const res = await fetch("http://localhost:8080/seal/rsa/decrypt", {
+ const res = await fetch("/seal/rsa/decrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: input })
});
diff --git a/backend/src/main/resources/get/rsa.html b/backend/src/main/resources/get/rsa.html
index e1a9ed1..1aa8196 100644
--- a/backend/src/main/resources/get/rsa.html
+++ b/backend/src/main/resources/get/rsa.html
@@ -30,8 +30,9 @@
@@ -67,7 +68,7 @@
try {
// NOTA: Controlla che la rotta nel tuo Java sia corretta (/seal/rsa/encrypt o /api/rsa/cifra)
- const res = await fetch("http://localhost:8080/seal/rsa/encrypt", {
+ const res = await fetch("/seal/rsa/encrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: plaintext, keysize: parseInt(size) })
});
@@ -83,7 +84,7 @@
try {
// NOTA: Controlla che la rotta nel tuo Java sia corretta (/seal/rsa/decrypt o /api/rsa/decifra)
- const res = await fetch("http://localhost:8080/seal/rsa/decrypt", {
+ const res = await fetch("/seal/rsa/decrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: input })
});