Skip to content

Commit

Permalink
fix TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Aug 16, 2023
1 parent 3b9dd16 commit 1ce1e9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/remix-architect/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ export async function sendRemixResponse(
let cookies: string[] = [];

// Arc/AWS API Gateway will send back set-cookies outside of response headers.
nodeResponse.headers.entries().forEach(([key, value]) => {
for (let [key, value] of nodeResponse.headers.entries()) {
if (key.toLowerCase() === "set-cookie") {
cookies.push(value);
}
});
}

if (cookies.length) {
nodeResponse.headers.delete("Set-Cookie");
Expand Down
6 changes: 3 additions & 3 deletions packages/remix-express/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ export async function sendRemixResponse(
res.statusMessage = nodeResponse.statusText;
res.status(nodeResponse.status);

nodeResponse.headers
.entries()
.forEach(([key, value]) => res.append(key, value));
for (let [key, value] of nodeResponse.headers.entries()) {
res.append(key, value);
}

if (nodeResponse.body) {
await writeReadableStreamToWritable(nodeResponse.body, res);
Expand Down

0 comments on commit 1ce1e9b

Please sign in to comment.