Skip to content

Commit 54c5e9f

Browse files
committed
no special treatement for netlify
1 parent 363ae79 commit 54c5e9f

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/utils/Socket.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
import { io } from "socket.io-client";
22

3-
const isNetlify = import.meta.env.VITE_IS_NETLIFY === "true";
4-
5-
// If on Netlify, use a relative path to trigger the netlify.toml proxy
6-
// Otherwise, use the direct Render URL (for Cloudflare Pages or local dev)
73
const URL = import.meta.env.PROD
8-
? isNetlify
9-
? "/"
10-
: "https://goobapp-backend-tsil.onrender.com"
4+
? "https://goobapp-backend-tsil.onrender.com"
115
: "http://localhost:3000";
126

137
export const SERVER_URL = URL;
148

159
export const socket = io(URL, {
1610
autoConnect: false,
17-
path: isNetlify ? "/api/socket.io" : "/socket.io",
11+
path: "/socket.io",
1812
transports: ["polling", "websocket"],
1913
});

0 commit comments

Comments
 (0)