From 75e04f722d8f1a5b63ebc75bddd3b168eea47abf Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 25 Jan 2026 02:53:50 +0000 Subject: [PATCH] Fix frontend API to use relative URLs through nginx proxy Changed default API_BASE_URL from 'http://localhost:8000' to empty string so requests go through nginx proxy instead of trying to connect directly. --- frontend/src/utils/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/utils/api.js b/frontend/src/utils/api.js index 972b566..9560a70 100644 --- a/frontend/src/utils/api.js +++ b/frontend/src/utils/api.js @@ -1,6 +1,7 @@ import axios from 'axios'; -const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000'; +// Use relative URLs to go through nginx proxy, or use env variable for direct connection +const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || ''; const api = axios.create({ baseURL: API_BASE_URL,