5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 08:10:56 +08:00

fix wss /wails/ipc (#2469)

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
i hate microsoft 2024-03-24 09:33:15 +08:00 committed by GitHub
parent bf2d6d3241
commit d3332f0b2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ function handleDisconnect() {
function _connect() {
if (websocket == null) {
websocket = new WebSocket('ws://' + window.location.host + '/wails/ipc');
websocket = new WebSocket((window.location.protocol.startsWith("https") ? "wss://" : "ws://") + window.location.host + "/wails/ipc");
websocket.onopen = handleConnect;
websocket.onerror = function (e) {
e.stopImmediatePropagation();

File diff suppressed because one or more lines are too long