How can i add the requester IP address to logs?
fmrosa opened this issue · 3 comments
fmrosa commented
There is a way to log the requester IP address to mailsac.log?
ruffrey commented
During an HTTP request to the UI, or during SMTP stuff?
fmrosa commented
The HTTP request. I just wanted to keep IP logs of people who accessed the UI for auditing in case something goes wrong or bad.
ruffrey commented
It is a standard express app using morgan for logging.
The middleware in mailsac is here:
https://github.com/ruffrey/mailsac/blob/master/app.js#L112
morgan logger formatting docs:
https://github.com/expressjs/morgan#predefined-formats