Spaces:
Sleeping
Sleeping
Update index.html
Browse files- 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
|
|
|
|
| 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) {
|