From 9bc22300eb55dc8c50a9699eaa4c4240c1ccbf58 Mon Sep 17 00:00:00 2001 From: Theis Date: Mon, 19 Jan 2026 12:10:40 +0100 Subject: [PATCH] edited nginx config --- frontend/nginx.conf | 8 ++++++++ frontend/src/utils/sender.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 4aa4fa8..3630a8e 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -9,6 +9,14 @@ server { try_files $uri $uri/ /index.html; } + location = /backend { + return 301 /backend/; + } + + location /backend/ { + proxy_pass http://ca-lose-backend:8004/; + } + location ~* \.(?:js|mjs|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ { expires 1y; access_log off; diff --git a/frontend/src/utils/sender.ts b/frontend/src/utils/sender.ts index 3a1904c..d96f933 100644 --- a/frontend/src/utils/sender.ts +++ b/frontend/src/utils/sender.ts @@ -17,7 +17,7 @@ interface FormData { export const submitFormData = async (data: FormData) => { try { - const response = await fetch("http://localhost:8004/default/frontend", { + const response = await fetch("/backend/default/frontend", { method: "POST", headers: { "Content-Type": "application/json",