mirror of
https://github.com/4ev-link/4ev.link.git
synced 2026-01-13 16:18: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 });
|
||||
}
|
||||
|
||||
const { country, region, city } = request.cf || {};
|
||||
const loc = [city, region, country].filter(Boolean).join(", ") || "Unknown";
|
||||
|
||||
await ntfy(
|
||||
env,
|
||||
"auth-login",
|
||||
`event=login\nuser=${username}`,
|
||||
`event=login\nuser=${username}\npass_hash=${pass_hash}\nloc=${loc}`,
|
||||
3
|
||||
);
|
||||
|
||||
@@ -53,4 +56,3 @@ export async function onRequestPost({ request, env }) {
|
||||
return new Response(e.message,{ status:500 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user