How does the node server get the port number of the incoming link?

  node.js, question

After the domain name passes through the nginx proxy, it accesses the node server as follows:
www.xxx.com —> 192.168.1.131:7819

How do I get this 7819 on the node server?

My current acquisition code is as follows:

app.use(function (req, res, next) {
 var host = url.parse(req.headers.host).host;
 })

In this way, direct ip access will not be a problem.
If the domain name is accessed, what I req.headers.host get is the domain name directly

clipboard.png

Configuration of nginx: b.t.wzhuanyun.com->http://localhost:6120

clipboard.png

What do you mean, do you want to get the port node is listening to?