Enhance WebSocket support and update environment configuration
- Added VITE_SOCKET_URL to docker-compose.yml for WebSocket connection. - Updated update-docker-env.sh to handle SSL options for WebSocket URLs. - Modified Dockerfile to include VITE_SOCKET_URL in env-config.js. - Implemented getSocketUrl function in frontend to retrieve WebSocket URL. - Refactored socket configuration to use centralized socket URL from environment settings.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import config from '@/config/env';
|
||||
|
||||
export const SOCKET_CONFIG = {
|
||||
url: import.meta.env.VITE_SOCKET_URL || 'ws://localhost:3000',
|
||||
url: config.socketUrl,
|
||||
options: {
|
||||
transports: ['websocket'],
|
||||
path: '/socket',
|
||||
|
||||
Reference in New Issue
Block a user