@sanity/client 7.4.1 → 7.5.0-live-cors.0

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/index.cjs CHANGED
@@ -1293,7 +1293,11 @@ class LiveClient {
1293
1293
  method: "OPTIONS",
1294
1294
  mode: "cors",
1295
1295
  credentials: esOptions.withCredentials ? "include" : "omit",
1296
- headers: esOptions.headers
1296
+ headers: {
1297
+ ...esOptions.headers,
1298
+ // for this preflight check, ensure we send what the browser would send if needed
1299
+ ...esOptions.headers?.Authorization ? { "Access-Control-Request-Headers": "authorization" } : {}
1300
+ }
1297
1301
  }).pipe(
1298
1302
  rxjs.mergeMap(() => rxjs.EMPTY),
1299
1303
  rxjs.catchError(() => {
@@ -2524,7 +2528,7 @@ function defineDeprecatedCreateClient(createClient2) {
2524
2528
  return config.printNoDefaultExport(), createClient2(config$1);
2525
2529
  };
2526
2530
  }
2527
- var name = "@sanity/client", version = "7.4.1";
2531
+ var name = "@sanity/client", version = "7.5.0-live-cors.0";
2528
2532
  const middleware = [
2529
2533
  middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
2530
2534
  middleware$1.headers({ "User-Agent": `${name} ${version}` }),