mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Merge pull request #565 from weaveworks/563-wss-websockets
Support wss for secure websockets when page was loaded over ssl
This commit is contained in:
5083
app/static.go
5083
app/static.go
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
// see main.js for the real entrypoint
|
||||
|
||||
// Inject websocket url to dev backend
|
||||
window.WS_URL = 'ws://' + location.hostname + ':4040';
|
||||
window.WS_PROTO = (location.protocol === 'https:' ? 'wss' : 'ws');
|
||||
window.WS_URL = window.WS_PROTO + '://' + location.hostname + ':4040';
|
||||
|
||||
require('./main');
|
||||
|
||||
@@ -3,8 +3,8 @@ const reqwest = require('reqwest');
|
||||
|
||||
const AppActions = require('../actions/app-actions');
|
||||
|
||||
const WS_URL = window.WS_URL || 'ws://' + location.host + location.pathname.replace(/\/$/, '');
|
||||
|
||||
const WS_PROTO = window.WS_PROTO || (location.protocol === 'https:' ? 'wss' : 'ws');
|
||||
const WS_URL = window.WS_URL || WS_PROTO + '://' + location.host + location.pathname.replace(/\/$/, '');
|
||||
|
||||
const apiTimerInterval = 10000;
|
||||
const reconnectTimerInterval = 5000;
|
||||
|
||||
Reference in New Issue
Block a user