From a1a818727b26d6d60826ec2c31e5d01ce577d1ce Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 4 Jan 2026 10:41:28 -0800 Subject: [PATCH] Log websocket protocol upgrade --- src/widgets/truenas/proxy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/truenas/proxy.js b/src/widgets/truenas/proxy.js index f328a14df..ebc5299ef 100644 --- a/src/widgets/truenas/proxy.js +++ b/src/widgets/truenas/proxy.js @@ -141,6 +141,8 @@ export default async function truenasProxyHandler(req, res, map) { let data; const wsUrl = new URL(formatApiCall(widgets[widget.type].wsAPI, { ...widget })); const useSecure = wsUrl.protocol === "https:" || Boolean(widget.key); // API key requires secure connection + if (useSecure && wsUrl.protocol !== "https:") + logger.info("Upgrading TrueNAS websocket connection to secure wss://"); wsUrl.protocol = useSecure ? "wss:" : "ws:"; logger.info("Connecting to TrueNAS websocket at %s", wsUrl); const ws = new WebSocket(wsUrl, { rejectUnauthorized: false });