From c26f458df7c6544be30d88e39769aa11ef53f3de Mon Sep 17 00:00:00 2001 From: "(jenkins)" <(jenkins)> Date: Fri, 17 Apr 2026 00:45:24 +0100 Subject: [PATCH] Fix issue with localhost refs --- frontend/Dockerfile | 4 ++-- frontend/src/services/api.js | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 7d44a8d..43790c4 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -12,8 +12,8 @@ COPY . . # Expose port EXPOSE 3050 -# Set environment variable for API URL -ENV VITE_API_URL=http://localhost:3051/api +# Set environment variable for API URL (relative to the frontend host) +ENV VITE_API_URL=/api # Start development server CMD ["npm", "start"] diff --git a/frontend/src/services/api.js b/frontend/src/services/api.js index 534126b..3d9346b 100644 --- a/frontend/src/services/api.js +++ b/frontend/src/services/api.js @@ -4,10 +4,7 @@ const API_BASE_URL = import.meta.env.VITE_API_URL || '/api'; const api = axios.create({ baseURL: API_BASE_URL, - timeout: 30000, - headers: { - 'Content-Type': 'application/json' - } + timeout: 30000 }); export const getLineOfSight = async (lat, lon, direction, tolerance) => {