We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d606b98 commit 57db5f7Copy full SHA for 57db5f7
static/js/socket-handlers.js
@@ -2,8 +2,9 @@
2
* WebSocket event handlers
3
*/
4
5
-// Initialize WebSocket connection
6
-const socket = new WebSocket('ws://' + window.location.host + '/socket.io/');
+// Initialize WebSocket connection with protocol detection
+const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
7
+const socket = new WebSocket(protocol + '//' + window.location.host + '/socket.io/');
8
9
// Performance: Scroll detection to pause DOM updates during scroll
10
let isScrolling = false;
0 commit comments