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;