Skip to content

Commit fffc508

Browse files
committed
fix: remove hostname-based API URL override, always use NEXT_PUBLIC_API_URL
1 parent 96d4a1c commit fffc508

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

client/src/lib/api.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
import axios, { AxiosError, AxiosInstance } from 'axios';
1010

1111
const getApiUrl = () => {
12-
if (typeof window !== 'undefined') {
13-
const { hostname } = window.location;
14-
// If running on a local network IP (e.g., 192.168.x.x), point to the same IP on port 3001
15-
if (hostname !== 'localhost' && hostname !== '127.0.0.1') {
16-
return `http://${hostname}:3001/api/v1`;
17-
}
18-
}
1912
return process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001/api/v1';
2013
};
2114

0 commit comments

Comments
 (0)