Skip to content

Commit

Permalink
DO-1563: (Legacy) Log custom header having the Prerender requester's …
Browse files Browse the repository at this point in the history
…User-Agent information
  • Loading branch information
Chris Park committed Nov 1, 2023
1 parent 9cb425a commit f764323
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/prerender-proxy/lib/handlers/prerender-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ export const handler = async (
request.headers["x-prerender-host"] = [
{ key: "X-Prerender-Host", value: request.headers.host[0].value },
];

// Custom header to be forwarded to Prerender service for better logging
request.headers["x-prerender-user-agent"] = [
{
key: "x-prerender-user-agent",
value: request.headers["user-agent"][0].value,
},
];
}
}

Expand Down

0 comments on commit f764323

Please sign in to comment.