@niledatabase/server 3.0.0-alpha.47 → 3.0.0-alpha.49

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.mjs CHANGED
@@ -392,8 +392,8 @@ function makeBasicHeaders(config, opts) {
392
392
  headers.set("Authorization", `Bearer ${getToken({ config })}`);
393
393
  }
394
394
  }
395
- if (config.secureCookies) {
396
- headers.set(X_NILE_SECURECOOKIES, "true");
395
+ if ("secureCookies" in config && config.secureCookies != null) {
396
+ headers.set(X_NILE_SECURECOOKIES, String(config.secureCookies));
397
397
  }
398
398
  return headers;
399
399
  }
@@ -524,6 +524,9 @@ async function request(url, _init, config) {
524
524
  String(request2.headers.get(X_NILE_TENANT))
525
525
  );
526
526
  }
527
+ if ("secureCookies" in config && config.secureCookies != null) {
528
+ updatedHeaders.set(X_NILE_SECURECOOKIES, String(config.secureCookies));
529
+ }
527
530
  updatedHeaders.set("host", requestUrl.host);
528
531
  updatedHeaders.set("niledb-origin", requestUrl.origin);
529
532
  const params = { ...init, headers: updatedHeaders };