From 2b9ef5a5c43a779eb7e4dbf7dfed2eaf99981690 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Mon, 15 Dec 2025 19:23:00 -0800 Subject: [PATCH] Refactor: Use NTFY_URL env var instead of constructing from NTFY_TOPIC --- functions/api/subscribe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/api/subscribe.js b/functions/api/subscribe.js index eb1c168..e9cef98 100644 --- a/functions/api/subscribe.js +++ b/functions/api/subscribe.js @@ -20,7 +20,7 @@ export async function onRequestPost({ request, env }) { return new Response(`{"error":"Resend error: ${text}"}`, { status: 500, headers: { 'Content-Type': 'application/json' } }); } - await fetch(`https://ntfy.sh/${env.NTFY_TOPIC}`, { + await fetch(env.NTFY_URL, { method: 'POST', headers: { Priority: '3', Title: `📬 ${geo}` }, body: email