@cstar.help/js
Advanced tools
@@ -291,3 +291,3 @@ "use strict"; | ||
| * Send analytics beacon (fire-and-forget). | ||
| * Uses text/plain Content-Type to avoid CORS preflight for cross-origin beacons. | ||
| * Must use application/json — SvelteKit CSRF rejects text/plain cross-origin. | ||
| * Falls back to fetch() if sendBeacon is unavailable or fails. | ||
@@ -304,3 +304,3 @@ */ | ||
| try { | ||
| const queued = navigator.sendBeacon?.(url, new Blob([payload], { type: "text/plain" })); | ||
| const queued = navigator.sendBeacon?.(url, new Blob([payload], { type: "application/json" })); | ||
| if (!queued) throw void 0; | ||
@@ -312,3 +312,3 @@ } catch { | ||
| body: payload, | ||
| headers: { "Content-Type": "text/plain" }, | ||
| headers: { "Content-Type": "application/json" }, | ||
| keepalive: true, | ||
@@ -315,0 +315,0 @@ mode: "cors" |
@@ -267,3 +267,3 @@ // src/proactive/index.ts | ||
| * Send analytics beacon (fire-and-forget). | ||
| * Uses text/plain Content-Type to avoid CORS preflight for cross-origin beacons. | ||
| * Must use application/json — SvelteKit CSRF rejects text/plain cross-origin. | ||
| * Falls back to fetch() if sendBeacon is unavailable or fails. | ||
@@ -280,3 +280,3 @@ */ | ||
| try { | ||
| const queued = navigator.sendBeacon?.(url, new Blob([payload], { type: "text/plain" })); | ||
| const queued = navigator.sendBeacon?.(url, new Blob([payload], { type: "application/json" })); | ||
| if (!queued) throw void 0; | ||
@@ -288,3 +288,3 @@ } catch { | ||
| body: payload, | ||
| headers: { "Content-Type": "text/plain" }, | ||
| headers: { "Content-Type": "application/json" }, | ||
| keepalive: true, | ||
@@ -291,0 +291,0 @@ mode: "cors" |
+1
-1
| { | ||
| "name": "@cstar.help/js", | ||
| "version": "0.10.1", | ||
| "version": "0.10.2", | ||
| "description": "Official TypeScript SDK for the cStar customer support platform", | ||
@@ -5,0 +5,0 @@ "type": "module", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
529348
0