@hanzo/event 0.3.25 → 0.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.cjs CHANGED
@@ -309,7 +309,7 @@ function hzAnonId() {
309
309
  }
310
310
 
311
311
  // src/version.ts
312
- var VERSION = "0.3.25";
312
+ var VERSION = "0.3.26";
313
313
 
314
314
  // src/sentry.ts
315
315
  var MAX_FRAMES = 50;
@@ -726,17 +726,18 @@ var DefaultTransport = class {
726
726
  }
727
727
  }
728
728
  if (typeof fetch !== "function") return;
729
+ const simple = opts.ingestKey !== void 0 && opts.contentType === void 0;
729
730
  const headers = {
730
- "Content-Type": opts.contentType ?? "application/json"
731
+ "Content-Type": simple ? BEACON_CONTENT_TYPE : opts.contentType ?? "application/json"
731
732
  };
732
- const bearer = opts.ingestKey ?? opts.token;
733
+ const bearer = simple ? void 0 : opts.ingestKey ?? opts.token;
733
734
  if (bearer) headers.Authorization = `Bearer ${bearer}`;
734
- void fetch(url, {
735
+ void fetch(simple ? appendQuery(url, "ingest_key", opts.ingestKey) : url, {
735
736
  method: "POST",
736
737
  headers,
737
738
  body,
738
739
  keepalive: true,
739
- credentials: "include"
740
+ credentials: simple ? "omit" : "include"
740
741
  }).then((res) => {
741
742
  if (!res.ok && opts.debug) {
742
743
  console.warn("[event] ingest rejected", res.status, url.split("?")[0]);