We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change getip function in morgan module index.js, and req.headers['x-real-ip'] will show the real ip!
The text was updated successfully, but these errors were encountered:
@wohugb You can custom the remote-addr token, like the below:
remote-addr
morgan.token('remote-addr', getip) function getip(req) { // do something }
Sorry, something went wrong.
@wohugb You can custom the remote-addr token, like the below: morgan.token('remote-addr', getip) function getip(req) { // do something }
works well with proxy-addr
import proxyaddr from 'proxy-addr'; morgan.token('remote-addr', function(req, res) { return proxyaddr.all(req); });
No branches or pull requests
change getip function in morgan module index.js, and req.headers['x-real-ip'] will show the real ip!
The text was updated successfully, but these errors were encountered: