File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export default {
138138 };
139139 },
140140 mounted () {
141- this .socket = io (websocket,[ ' binary ' , ' base64 ' ]); // Use socket.io-client here instead of WebSocket
141+ this .socket = io (websocket,transports : [ " websocket " , " polling " ]); // Use socket.io-client here instead of WebSocket
142142 this .socket .on (' notification' , (data ) => {
143143 this .notifications .unshift ({ ... data, timestamp: new Date () });
144144 this .showBrowserNotification (data .message );
Original file line number Diff line number Diff line change 11module . exports = {
2- devServer : {
3- host : '0.0.0.0' , // Allow external access
4- port : 8080 ,
5- client : {
6- webSocketURL : {
7- hostname : 'https://club-notification-backend.vercel.app' , // Replace with your actual hostname
8- port : 443 , // Use HTTPS port
9- pathname : '/ws' ,
10- protocol : 'wss:' , // Secure WebSocket
11- } ,
2+ devServer : {
3+ host : "0.0.0.0" , // Allow external access
4+ port : 8080 ,
5+ client : {
6+ webSocketURL : {
7+ hostname : "club-notification-backend.vercel.app" , // Your backend domain
8+ port : 443 , // HTTPS WebSocket
9+ pathname : "/socket.io/" ,
10+ protocol : "wss:" , // Secure WebSocket
1211 } ,
13- server : 'https' , // Enable HTTPS
1412 } ,
15- } ;
16-
13+ proxy : {
14+ "/socket.io/" : {
15+ target : "https://club-notification-backend.vercel.app" , // Backend URL
16+ ws : true , // Enable WebSocket proxying
17+ changeOrigin : true ,
18+ } ,
19+ } ,
20+ server : "https" , // Enable HTTPS
21+ } ,
22+ } ;
You can’t perform that action at this time.
0 commit comments