jojonocode commited on
Commit
e280e48
·
verified ·
1 Parent(s): 0166753

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -3
index.html CHANGED
@@ -143,10 +143,9 @@
143
  </div>
144
 
145
  <script>
146
- const wsHost = window.location.hostname || '127.0.0.1';
147
- const wsPort = window.location.port || '7860';
148
  const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
149
- const socket = new WebSocket(`${wsProtocol}://${wsHost}:${wsPort}/ws`);
 
150
  let lastPrices = { 'XAU/USD': 0, 'EUR/USD': 0 };
151
 
152
  socket.onmessage = function(event) {
 
143
  </div>
144
 
145
  <script>
 
 
146
  const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
147
+ const wsHost = window.location.host; // inclus host[:port] si nécessaire
148
+ const socket = new WebSocket(`${wsProtocol}://${wsHost}/ws`);
149
  let lastPrices = { 'XAU/USD': 0, 'EUR/USD': 0 };
150
 
151
  socket.onmessage = function(event) {