Fix API URL to use relative path in production

This commit is contained in:
AI Bot
2026-07-30 16:06:13 +05:30
parent 3401f748c3
commit 8751a4e8fa
+1 -1
View File
@@ -1,4 +1,4 @@
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3005/api'; const API_URL = import.meta.env.VITE_API_URL || (import.meta.env.PROD ? '/api' : 'http://localhost:3005/api');
const getHeaders = () => { const getHeaders = () => {
const token = localStorage.getItem('auth_token'); const token = localStorage.getItem('auth_token');