Commit ff88d8ce81c7d8e13f8b6c2298944e337d153229

Authored by Igor Kulikov
1 parent 1aa4406c

UI: Fix websocket port detection for MS Edge and IE

1 1 {
2 2 "name": "thingsboard",
3 3 "private": true,
4   - "version": "1.2.2",
  4 + "version": "1.2.3",
5 5 "description": "Thingsboard UI",
6 6 "licenses": [
7 7 {
... ...
... ... @@ -45,15 +45,21 @@ function TelemetryWebsocketService($rootScope, $websocket, $timeout, $window, ty
45 45 socketCloseTimer,
46 46 reconnectTimer;
47 47
  48 + var port = location.port;
48 49 if (location.protocol === "https:") {
  50 + if (!port) {
  51 + port = "443";
  52 + }
49 53 telemetryUri = "wss:";
50 54 } else {
  55 + if (!port) {
  56 + port = "80";
  57 + }
51 58 telemetryUri = "ws:";
52 59 }
53   - telemetryUri += "//" + location.hostname + ":" + location.port;
  60 + telemetryUri += "//" + location.hostname + ":" + port;
54 61 telemetryUri += "/api/ws/plugins/telemetry";
55 62
56   -
57 63 var service = {
58 64 subscribe: subscribe,
59 65 unsubscribe: unsubscribe
... ...