try to force header order
This commit is contained in:
parent
563df3018c
commit
16f42e5cd9
|
@ -55,18 +55,18 @@ export const signedFetch = async (url: string, init: RequestInit, signedInit: Si
|
||||||
headers: signedHeaders
|
headers: signedHeaders
|
||||||
});
|
});
|
||||||
|
|
||||||
const newHeaders = new Headers(
|
const newHeaders: HeadersInit =
|
||||||
[
|
[
|
||||||
...signedHeaders,
|
...signedHeaders,
|
||||||
["Signature", signature],
|
["Signature", signature],
|
||||||
["Content-Type", `application/ld+json; profile="${CONTEXT}"`]
|
["Content-Type", `application/ld+json; profile="${CONTEXT}"`]
|
||||||
]
|
]
|
||||||
);
|
;
|
||||||
|
|
||||||
if (Array.isArray(init.headers))
|
if (Array.isArray(init.headers))
|
||||||
init.headers
|
init.headers
|
||||||
.filter((header) => Array.isArray(header))
|
.filter((header) => Array.isArray(header))
|
||||||
.forEach(([key, value]) => newHeaders.set(key, value));
|
.forEach(([key, value]) => newHeaders.push([key, value]));
|
||||||
|
|
||||||
console.log("Headers:");
|
console.log("Headers:");
|
||||||
for (const [key, value] of newHeaders) {
|
for (const [key, value] of newHeaders) {
|
||||||
|
|
Loading…
Reference in New Issue