Fix duplicate port on websocket if not port 80 on webserver thanks @TheFlash12314

This commit is contained in:
Luc
2018-11-29 08:54:00 +01:00
parent 103d24cd91
commit 4b5249329d
3 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ESP3D WebUI</title>
<script>var target_firmware="";</script>
<script>var web_ui_version="2.0c30";</script>
<script>var web_ui_version="2.0c31";</script>
<script>var direct_sd=false;</script>
<script>var fw_version="";</script>
<script>var primary_sd= "/ext/";</script>

View File

@@ -66,7 +66,7 @@ function startSocket(){
}
else {
console.log("Socket port is :" + websocket_port);
ws_source = new WebSocket('ws://'+document.location.host+':' + websocket_port,['arduino']);
ws_source = new WebSocket('ws://'+document.location.hostname+':' + websocket_port,['arduino']);
}
ws_source.binaryType = "arraybuffer";
ws_source.onopen = function(e){