Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

Commit

Permalink
fix(lambda-at-edge): do not follow redirect in fetch during rewrite (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dphang authored Mar 21, 2021
1 parent 11101e7 commit 0383cf2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/libs/lambda-at-edge/src/routing/rewriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,15 @@ export async function createExternalRewriteResponse(
headers: reqHeaders,
method: req.method,
body: decodedBody, // Must pass body as a string,
compress: false
compress: false,
redirect: "manual"
});
} else {
fetchResponse = await fetch(customRewrite, {
headers: reqHeaders,
method: req.method,
compress: false
compress: false,
redirect: "manual"
});
}

Expand Down

0 comments on commit 0383cf2

Please sign in to comment.