Commit 4d84a433 authored by wu-lee's avatar wu-lee

serve.js - log the hostname too

parent be9f91f9
......@@ -56,10 +56,11 @@ app.use(express.urlencoded({extended: true}));
app.all('*', (req, res, next) => {
next();
httplog.info(`${req.method} ${req.url} ${req.ip} ${res.statusCode}`, {
httplog.info(`${req.method} ${req.url} ${req.hostname} ${req.ip} ${res.statusCode}`, {
method: req.method,
url: req.url,
ip: req.ip,
host: req.hostname,
code: res.statusCode,
});
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment