From bcc3bfc288cc4f2ae74fb6d07b0c5000e902299b Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 8 Mar 2025 14:33:00 +1300 Subject: [PATCH] Recognise matrix-media-repo URL preview agent --- src/web/routes/log-in-with-matrix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/routes/log-in-with-matrix.js b/src/web/routes/log-in-with-matrix.js index 89d36c2..1066f03 100644 --- a/src/web/routes/log-in-with-matrix.js +++ b/src/web/routes/log-in-with-matrix.js @@ -53,7 +53,7 @@ as.router.get("/log-in-with-matrix", defineEventHandler(async event => { } const userAgent = getRequestHeader(event, "User-Agent") - if (userAgent?.match(/bot/)) throw createError({status: 400, data: "Sorry URL previewer, you can't have this URL."}) + if (userAgent?.match(/bot|matrix/)) throw createError({status: 400, data: "Sorry URL previewer, you can't have this URL."}) if (!validToken.has(token)) return sendRedirect(event, `${reg.ooye.bridge_origin}/log-in-with-matrix`, 302)