Skip to content

Commit 6eabf4d

Browse files
committed
Fix API base URL to always use VITE_API_URL when available
1 parent df405ac commit 6eabf4d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

frontend/src/services/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import axios from 'axios'
33
const getApiBaseURL = () => {
44
if (typeof window !== 'undefined') {
55
const env = (import.meta as any).env
6-
if (env?.PROD && env?.VITE_API_URL) {
6+
// Always check VITE_API_URL first, regardless of environment
7+
if (env?.VITE_API_URL) {
78
return `${env.VITE_API_URL}/api`
89
}
910
}

0 commit comments

Comments
 (0)