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;