From 60bd154e5a335aa00d54ed04032562d01f99243b Mon Sep 17 00:00:00 2001 From: George McCain Date: Fri, 13 Feb 2026 16:20:28 -0500 Subject: [PATCH] fix: parse webhook URL pathname instead of raw string match Fixes incorrect path matching that would reject valid webhooks with querystrings and match unintended prefixes like /linq-webhookX. Co-Authored-By: Claude Opus 4.6 --- src/linq/monitor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linq/monitor.ts b/src/linq/monitor.ts index 5b686784930..c9ac12ba833 100644 --- a/src/linq/monitor.ts +++ b/src/linq/monitor.ts @@ -372,7 +372,8 @@ export async function monitorLinqProvider(opts: MonitorLinqOpts = {}): Promise { - if (req.method !== "POST" || !req.url?.startsWith(webhookPath)) { + const url = new URL(req.url || "/", `http://${req.headers.host}`); + if (req.method !== "POST" || !url.pathname.startsWith(webhookPath)) { res.writeHead(404); res.end(); return;