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');