add: allow 'ws' for private ip

This commit is contained in:
Linventif 2024-06-29 04:04:13 +00:00
parent 8078456b2a
commit 12a017630c

View File

@ -24,7 +24,8 @@ end
require("gwsockets") require("gwsockets")
local function getWebSocketURL() local function getWebSocketURL()
return "wss://" .. gmInte.config.websocketFQDN local method = gmInte.isPrivateIP(gmInte.config.websocketFQDN) && "ws" || "wss"
return method .. "://" .. gmInte.config.websocketFQDN
end end
local socket = GWSockets.createWebSocket(getWebSocketURL()) local socket = GWSockets.createWebSocket(getWebSocketURL())