Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
1234567891011121314151617/** * Client-side helper for IndexNow pings via the internal proxy. * Guarantees fire-and-forget: errors are caught silently so user flows are never blocked. */export const pingIndexNow = (urls: string | string[]): void => { const list = Array.isArray(urls) ? urls : [urls]; if (typeof window === "undefined" || list.length === 0) return;
void fetch("/_internal/indexnow", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ urls: list }) }).catch(() => { // silent fire-and-forget });};