If the front and rear ends are separated, how does nginx obtain the front-end ports?

problem description

when a page running by npm run dev sends a request, the $remote_port of nginx is a random port (refresh the page, the port number changes), so how does nginx get the port number of the front end?

Nov.09,2021

get request header / contains host related information
Menu