Use node.js to create a service locally to listen to port 80. I visit it in the browser, for example: www.baidu.com
Req.headers cannot be logged in node.js. And accessing 127.0.0.1 will get the headers.
Is the service local and must be accessed locally? Visiting www.baidu.com is accessing Baidu's server. But they are all through port 80. I don’t know why it works? (Ask God for guidance.)
When you access Baidu’s port 80, this port 80 belongs to the other party. The local machine is assigned a dynamic port to connect to.
The locally open port 80 is to monitor the connections of "others". When others access your IP (of course, including your own reflective IP [::1]), it is your port 80 that is connected