use req.connection.remoteAddress instead of req.ip.
use nginx proxy.
typo.
use x-forwarded-for instead of x-real-ip.
remove req.ip.
use x-real-ip.
add nginx config.;