Commit ff88d8ce81c7d8e13f8b6c2298944e337d153229
1 parent
1aa4406c
UI: Fix websocket port detection for MS Edge and IE
Showing
2 changed files
with
9 additions
and
3 deletions
... | ... | @@ -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 | ... | ... |