fix: Resolve socket mixed content error by making the socket connection URL environment-aware for production and development, and adding Vite client type definitions.
All checks were successful
Build and Deploy / build (push) Successful in 1m18s

This commit is contained in:
2025-12-16 17:33:05 +01:00
parent 8a40bc6ca4
commit 58641b34a5
3 changed files with 17 additions and 1 deletions

View File

@@ -1,7 +1,8 @@
/// <reference types="vite/client" />
import { io, Socket } from 'socket.io-client';
const URL = `http://${window.location.hostname}:3000`;
const URL = import.meta.env.PROD ? undefined : `http://${window.location.hostname}:3000`;
class SocketService {
public socket: Socket;