@makeswift/runtime 0.2.17 → 0.2.18
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.js
CHANGED
|
@@ -926,11 +926,17 @@ if (window.parent !== window) {
|
|
|
926
926
|
} else {
|
|
927
927
|
const originalFetch = window.fetch
|
|
928
928
|
|
|
929
|
-
window.fetch = function patchedFetch(
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
929
|
+
window.fetch = function patchedFetch(resource, options) {
|
|
930
|
+
const request = new Request(resource, options)
|
|
931
|
+
|
|
932
|
+
if (new URL(request.url).origin !== window.location.origin) {
|
|
933
|
+
return originalFetch.call(this, resource, options)
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
return originalFetch.call(
|
|
937
|
+
this,
|
|
938
|
+
new Request(request, { headers: { [headerName]: secret } }),
|
|
939
|
+
)
|
|
934
940
|
}
|
|
935
941
|
}
|
|
936
942
|
}
|
|
@@ -1001,7 +1007,7 @@ class Document$1 extends NextDocument__default["default"] {
|
|
|
1001
1007
|
});
|
|
1002
1008
|
}
|
|
1003
1009
|
}
|
|
1004
|
-
const version = "0.2.
|
|
1010
|
+
const version = "0.2.18";
|
|
1005
1011
|
function isErrorWithMessage(error) {
|
|
1006
1012
|
return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
|
|
1007
1013
|
}
|