mirror of
https://github.com/ShaYmez/HBMonv2.git
synced 2026-06-01 21:44:46 -04:00
SSL and nonSSL at the same time.
Add the possibility of using SSL and non-SSL connections to HBMon. Please adjust the network ports (according to your needs) both in monitor.py and hbmon.js
This commit is contained in:
@@ -11,9 +11,15 @@
|
||||
masters_table = document.getElementById('masters');
|
||||
opb_table = document.getElementById('opb');
|
||||
peers_table = document.getElementById('peers');
|
||||
|
||||
wsuri = (((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.hostname + ":9000");
|
||||
|
||||
|
||||
// Use both https and http protocols
|
||||
if (window.location.protocol != "https:") {
|
||||
wsuri = "ws://" + window.location.hostname + ":9000";
|
||||
}
|
||||
else {
|
||||
wsuri = (((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.hostname + ":9001");
|
||||
}
|
||||
|
||||
if ("WebSocket" in window) {
|
||||
sock = new WebSocket(wsuri);
|
||||
} else if ("MozWebSocket" in window) {
|
||||
|
||||
Reference in New Issue
Block a user