mirror of
https://github.com/golang/go
synced 2024-11-18 12:04:57 -07:00
cmd/present: support being reverse proxied from https
Fixes golang/go#21921 Change-Id: Idc6ff2773dcef7210ce4d0eecb7affb357a213b5 GitHub-Last-Rev: 50b959e9b6f2f1513235c5ca0124d80b487c5296 GitHub-Pull-Request: golang/tools#26 Reviewed-on: https://go-review.googlesource.com/96295 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
2ae76fd156
commit
10db2d12cf
@ -118,7 +118,12 @@ function SocketTransport() {
|
||||
var id = 0;
|
||||
var outputs = {};
|
||||
var started = {};
|
||||
var websocket = new WebSocket('ws://' + window.location.host + '/socket');
|
||||
var websocket;
|
||||
if (window.location.protocol == "http:") {
|
||||
websocket = new WebSocket('ws://' + window.location.host + '/socket');
|
||||
} else if (window.location.protocol == "https:") {
|
||||
websocket = new WebSocket('wss://' + window.location.host + '/socket');
|
||||
}
|
||||
|
||||
websocket.onclose = function() {
|
||||
console.log('websocket connection closed');
|
||||
|
@ -2314,7 +2314,12 @@ function SocketTransport() {
|
||||
var id = 0;
|
||||
var outputs = {};
|
||||
var started = {};
|
||||
var websocket = new WebSocket('ws://' + window.location.host + '/socket');
|
||||
var websocket;
|
||||
if (window.location.protocol == "http:") {
|
||||
websocket = new WebSocket('ws://' + window.location.host + '/socket');
|
||||
} else if (window.location.protocol == "https:") {
|
||||
websocket = new WebSocket('wss://' + window.location.host + '/socket');
|
||||
}
|
||||
|
||||
websocket.onclose = function() {
|
||||
console.log('websocket connection closed');
|
||||
|
Loading…
Reference in New Issue
Block a user