From 9f0bb8eae7991c869c2c0209ed328ee18fb01fd5 Mon Sep 17 00:00:00 2001 From: posimai Date: Wed, 22 Apr 2026 10:04:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(together):=20x.com=20=E5=9F=8B=E3=82=81?= =?UTF-8?q?=E8=BE=BC=E3=81=BFURL=E3=81=AE=E3=83=88=E3=83=A9=E3=83=83?= =?UTF-8?q?=E3=82=AD=E3=83=B3=E3=82=B0=E3=83=91=E3=83=A9=E3=83=A1=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=82=92=E9=99=A4=E5=8E=BB=E3=81=97=E3=81=A6Jina?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E7=B2=BE=E5=BA=A6=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server.js b/server.js index f0de19c9..bf1c803b 100644 --- a/server.js +++ b/server.js @@ -2594,6 +2594,13 @@ ${excerpt} // fire-and-forget アーカイブ: Jina Reader → Gemini 要約(直列) async function archiveShare(shareId, url) { + // x.com / twitter.com のトラッキングパラメータを除去(埋め込みURLの ?ref_src=twsrc... 等) + try { + const u = new URL(url); + if (/^(x\.com|twitter\.com)$/.test(u.hostname.replace('www.', ''))) { + url = `${u.origin}${u.pathname}`; + } + } catch (_) {} if (!url || !isSsrfSafe(url)) { await pool.query(`UPDATE together_shares SET archive_status='failed' WHERE id=$1`, [shareId]); return;