From a95da3d10815b17f54d1fff51233b7686f6bc893 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 30 Aug 2025 02:50:12 +0200 Subject: [PATCH] Improve image detection (#2472) * Mark every non-https link as 'not image' * Mark xcancel.com links as 'not image' --- worker/imgproxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/imgproxy.js b/worker/imgproxy.js index 421ea7fb..44d0beed 100644 --- a/worker/imgproxy.js +++ b/worker/imgproxy.js @@ -31,9 +31,9 @@ const imageUrlMatchers = [ u => u.host === 'i.imgur.com' ] const exclude = [ - u => u.protocol === 'mailto:', + u => u.protocol !== 'https:', u => u.host.endsWith('.onion') || u.host.endsWith('.b32.ip') || u.host.endsWith('.loki'), - u => ['twitter.com', 'x.com', 'nitter.it', 'nitter.at'].some(h => h === u.host), + u => ['twitter.com', 'x.com', 'nitter.it', 'nitter.at', 'xcancel.com'].some(h => h === u.host), u => u.host === 'stacker.news', u => u.host === 'news.ycombinator.com', u => u.host === 'www.youtube.com' || u.host === 'youtu.be',