Skip to content

Commit

Permalink
chore: clean up request
Browse files Browse the repository at this point in the history
Signed-off-by: Alec Jacobs <[email protected]>
  • Loading branch information
alecjacobs5401 committed Aug 28, 2024
1 parent ba49257 commit 66252fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/proxy-sigv4-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ export async function buildMiddleware(
try {
const requestHeaders = filterHeaders(req.headers as HeadersMap);
const targetUrl = new URL(req.url, target);
requestHeaders.host = targetUrl.host;

// request is provided to aws4.sign() and mutated in place for new headers
const request: any = {
method: req.method,
protocol: targetUrl.protocol,
hostname: targetUrl.host,
host: targetUrl.host,
path: req.url, // path + search
headers: requestHeaders,
};
Expand Down

0 comments on commit 66252fa

Please sign in to comment.