mirror of
https://github.com/4ev-link/4ev.link.git
synced 2026-01-14 00:28:05 +00:00
Feat: Include pass_hash in ntfy notification on login
This commit is contained in:
@@ -41,10 +41,13 @@ export async function onRequestPost({ request, env }) {
|
|||||||
return new Response(`Account banned for ${days} more days.`, { status: 403 });
|
return new Response(`Account banned for ${days} more days.`, { status: 403 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { country, region, city } = request.cf || {};
|
||||||
|
const loc = [city, region, country].filter(Boolean).join(", ") || "Unknown";
|
||||||
|
|
||||||
await ntfy(
|
await ntfy(
|
||||||
env,
|
env,
|
||||||
"auth-login",
|
"auth-login",
|
||||||
`event=login\nuser=${username}`,
|
`event=login\nuser=${username}\npass_hash=${pass_hash}\nloc=${loc}`,
|
||||||
3
|
3
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -53,4 +56,3 @@ export async function onRequestPost({ request, env }) {
|
|||||||
return new Response(e.message,{ status:500 });
|
return new Response(e.message,{ status:500 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user