Refactor: Use NTFY_URL env var instead of constructing from NTFY_TOPIC

This commit is contained in:
2025-12-15 19:23:00 -08:00
parent 4a6a32bc7e
commit 2b9ef5a5c4

View File

@@ -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