I have a realy interesting problem. I have a web site and i want to get client ip address. I found some solition but none of them work. I am using nginx.
i am using expressjs
app.post("/api/test",(req, res)=>{
console.log(req.header('x-forwarded-for')) // result "::1"
console.log(req.connection.remoteAddress) // result "::1"
console.log(req.ip) // result "::1"
})
I try yo use 3 party freamwork but result same.