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
|
||||
});
|
||||
|
||||
const newHeaders = new Headers(
|
||||
const newHeaders: HeadersInit =
|
||||
[
|
||||
...signedHeaders,
|
||||
["Signature", signature],
|
||||
["Content-Type", `application/ld+json; profile="${CONTEXT}"`]
|
||||
]
|
||||
);
|
||||
;
|
||||
|
||||
if (Array.isArray(init.headers))
|
||||
init.headers
|
||||
.filter((header) => Array.isArray(header))
|
||||
.forEach(([key, value]) => newHeaders.set(key, value));
|
||||
.forEach(([key, value]) => newHeaders.push([key, value]));
|
||||
|
||||
console.log("Headers:");
|
||||
for (const [key, value] of newHeaders) {
|
||||
|
|
Loading…
Reference in New Issue