@niledatabase/server 3.0.0-alpha.48 → 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.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -398,8 +398,8 @@ function makeBasicHeaders(config, opts) {
|
|
|
398
398
|
headers.set("Authorization", `Bearer ${getToken({ config })}`);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
if (config.secureCookies) {
|
|
402
|
-
headers.set(X_NILE_SECURECOOKIES,
|
|
401
|
+
if ("secureCookies" in config && config.secureCookies != null) {
|
|
402
|
+
headers.set(X_NILE_SECURECOOKIES, String(config.secureCookies));
|
|
403
403
|
}
|
|
404
404
|
return headers;
|
|
405
405
|
}
|
|
@@ -530,6 +530,9 @@ async function request(url, _init, config) {
|
|
|
530
530
|
String(request2.headers.get(X_NILE_TENANT))
|
|
531
531
|
);
|
|
532
532
|
}
|
|
533
|
+
if ("secureCookies" in config && config.secureCookies != null) {
|
|
534
|
+
updatedHeaders.set(X_NILE_SECURECOOKIES, String(config.secureCookies));
|
|
535
|
+
}
|
|
533
536
|
updatedHeaders.set("host", requestUrl.host);
|
|
534
537
|
updatedHeaders.set("niledb-origin", requestUrl.origin);
|
|
535
538
|
const params = { ...init, headers: updatedHeaders };
|