@surelle-ha/dead-fuse 1.0.9 → 1.0.10
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 +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -250,6 +250,7 @@ var DeadFuseConnection = class {
|
|
|
250
250
|
const masterUrl = this.config.master ?? DEFAULT_MASTER;
|
|
251
251
|
if (!masterUrl || !this.config.token) return;
|
|
252
252
|
try {
|
|
253
|
+
const clientHost = typeof window !== "undefined" ? window.location.origin : void 0;
|
|
253
254
|
const res = await fetch(
|
|
254
255
|
`${masterUrl.replace(/\/$/, "")}/api/project/${encodeURIComponent(
|
|
255
256
|
this.config.projectId
|
|
@@ -257,7 +258,7 @@ var DeadFuseConnection = class {
|
|
|
257
258
|
{
|
|
258
259
|
method: "POST",
|
|
259
260
|
headers: { "Content-Type": "application/json" },
|
|
260
|
-
body: JSON.stringify({ token: this.config.token, clientId: this.clientId })
|
|
261
|
+
body: JSON.stringify({ token: this.config.token, clientId: this.clientId, host: clientHost })
|
|
261
262
|
}
|
|
262
263
|
);
|
|
263
264
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
package/dist/index.mjs
CHANGED
|
@@ -223,6 +223,7 @@ var DeadFuseConnection = class {
|
|
|
223
223
|
const masterUrl = this.config.master ?? DEFAULT_MASTER;
|
|
224
224
|
if (!masterUrl || !this.config.token) return;
|
|
225
225
|
try {
|
|
226
|
+
const clientHost = typeof window !== "undefined" ? window.location.origin : void 0;
|
|
226
227
|
const res = await fetch(
|
|
227
228
|
`${masterUrl.replace(/\/$/, "")}/api/project/${encodeURIComponent(
|
|
228
229
|
this.config.projectId
|
|
@@ -230,7 +231,7 @@ var DeadFuseConnection = class {
|
|
|
230
231
|
{
|
|
231
232
|
method: "POST",
|
|
232
233
|
headers: { "Content-Type": "application/json" },
|
|
233
|
-
body: JSON.stringify({ token: this.config.token, clientId: this.clientId })
|
|
234
|
+
body: JSON.stringify({ token: this.config.token, clientId: this.clientId, host: clientHost })
|
|
234
235
|
}
|
|
235
236
|
);
|
|
236
237
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|