mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 17:24:48 +00:00
App grants: re-check the webhook host is public on every delivery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f19b817c70
commit
4990e46fc4
3 changed files with 19 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ async function deliver(grants, type, sealedById = {}) {
|
|||
recipient_user_id: parseJson(g.recipient, {})?.user_id ?? null,
|
||||
...(sealedById[g.id] ? { sealed: sealedById[g.id] } : {}),
|
||||
};
|
||||
const r = await sendWebhook(g.webhook_url, g.webhook_secret, payload, { fetchImpl });
|
||||
const r = await sendWebhook(g.webhook_url, g.webhook_secret, payload, { fetchImpl, allowLocal: ALLOW_LOCAL });
|
||||
await run(`UPDATE app_grants SET last_delivered_at = ?, last_error = ? WHERE id = ?`, [r.ok ? Date.now() : g.last_delivered_at ?? null, r.ok ? null : r.error, g.id]);
|
||||
out.push({ grant_id: g.id, key_name: g.key_name, delivered: r.ok, ...(r.ok ? {} : { error: r.error }) });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue