To inject logging for incoming requests, modify the following file:\nextjs\node_modules\next\dist\server\lib\start-server.js
You can tap into "request" event and log out information:
srv.on('request', (req) => {
console.log('AK Request', req.url);
//console.log('-----------------------------', req.rawHeaders);
//console.log('-----------------------------');
});
req object has a lot of other yummy info. You can see all the properties by just outputting req object itself