use wss if site was loaded via https

This commit is contained in:
j 2024-08-09 15:40:19 +02:00
parent 761f973895
commit a85cd8b9bf

View file

@ -219,7 +219,7 @@
function loadOML(browserSupported) { function loadOML(browserSupported) {
window.oml = Ox.App({ window.oml = Ox.App({
name: 'oml', name: 'oml',
socket: 'ws://' + document.location.host + '/ws', socket: document.location.protocol.replace('http', 'ws') + '//' + document.location.host + '/ws',
url: '/api/' url: '/api/'
}).bindEvent({ }).bindEvent({
load: function(data) { load: function(data) {