Fix API URL to use relative path in production
This commit is contained in:
+1
-1
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user