Skip to content

Commit

Permalink
fix: log user-agent (#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle authored Apr 19, 2024
1 parent aa37dff commit 44b5f97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ console.log('AWS_SECRET_ACCESS_KEY: ', process.env.AWS_SECRET_ACCESS_KEY);
export async function handler(req: IncomingMessage, res: ServerResponse) {
let { method, url, headers } = req;
console.log(`${method} ${headers.host}${url}`);
console.log(`user-agent: ${headers['user-agent']}`);
let { pathname = '/', query = {} } = parse(url || '', true);
if (!pathname || pathname === '/') {
pathname = pages.index;
Expand Down

0 comments on commit 44b5f97

Please sign in to comment.