From 12a017630cecb108b42a33090ccd5319fef11b02 Mon Sep 17 00:00:00 2001 From: Linventif Date: Sat, 29 Jun 2024 04:04:13 +0000 Subject: [PATCH] add: allow 'ws' for private ip --- lua/gmod_integration/server/sv__websocket.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/gmod_integration/server/sv__websocket.lua b/lua/gmod_integration/server/sv__websocket.lua index 2382d80..f52f5c4 100644 --- a/lua/gmod_integration/server/sv__websocket.lua +++ b/lua/gmod_integration/server/sv__websocket.lua @@ -24,7 +24,8 @@ end require("gwsockets") local function getWebSocketURL() - return "wss://" .. gmInte.config.websocketFQDN + local method = gmInte.isPrivateIP(gmInte.config.websocketFQDN) && "ws" || "wss" + return method .. "://" .. gmInte.config.websocketFQDN end local socket = GWSockets.createWebSocket(getWebSocketURL())