@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.mjs CHANGED
@@ -307,7 +307,7 @@ function hzAnonId() {
307
307
  }
308
308
 
309
309
  // src/version.ts
310
- var VERSION = "0.3.25";
310
+ var VERSION = "0.3.26";
311
311
 
312
312
  // src/sentry.ts
313
313
  var MAX_FRAMES = 50;
@@ -724,17 +724,18 @@ var DefaultTransport = class {
724
724
  }
725
725
  }
726
726
  if (typeof fetch !== "function") return;
727
+ const simple = opts.ingestKey !== void 0 && opts.contentType === void 0;
727
728
  const headers = {
728
- "Content-Type": opts.contentType ?? "application/json"
729
+ "Content-Type": simple ? BEACON_CONTENT_TYPE : opts.contentType ?? "application/json"
729
730
  };
730
- const bearer = opts.ingestKey ?? opts.token;
731
+ const bearer = simple ? void 0 : opts.ingestKey ?? opts.token;
731
732
  if (bearer) headers.Authorization = `Bearer ${bearer}`;
732
- void fetch(url, {
733
+ void fetch(simple ? appendQuery(url, "ingest_key", opts.ingestKey) : url, {
733
734
  method: "POST",
734
735
  headers,
735
736
  body,
736
737
  keepalive: true,
737
- credentials: "include"
738
+ credentials: simple ? "omit" : "include"
738
739
  }).then((res) => {
739
740
  if (!res.ok && opts.debug) {
740
741
  console.warn("[event] ingest rejected", res.status, url.split("?")[0]);