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.
This commit is contained in:
Claude
2026-01-25 02:53:50 +00:00
parent 6238318f9b
commit 75e04f722d
+2 -1
View File
@@ -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,