We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96d4a1c commit fffc508Copy full SHA for fffc508
1 file changed
client/src/lib/api.ts
@@ -9,13 +9,6 @@
9
import axios, { AxiosError, AxiosInstance } from 'axios';
10
11
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
19
return process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001/api/v1';
20
};
21
0 commit comments