From ec6db02829dbd099b99dc90f4bfd97c2ae73da6e Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 23 Feb 2026 13:07:04 +0200 Subject: [PATCH] fix: host whitelist logic --- src/common/Platform/Platform.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/Platform/Platform.tsx b/src/common/Platform/Platform.tsx index 0da1881ef..86ca999c6 100644 --- a/src/common/Platform/Platform.tsx +++ b/src/common/Platform/Platform.tsx @@ -18,7 +18,9 @@ const PlatformProvider = ({ children }: Props) => { const openExternal = (url: string) => { try { const { hostname } = new URL(url); - const isWhitelisted = WHITELISTED_HOSTS.some((host: string) => hostname.endsWith(host)); + const isWhitelisted = WHITELISTED_HOSTS.some((host: string) => + hostname === host || hostname.endsWith('.' + host) + ); const finalUrl = !isWhitelisted ? `https://www.stremio.com/warning#${encodeURIComponent(url)}` : url; window.open(finalUrl, '_blank');