Mobile app version of vmapp.org
Login or Join
Si4351233

: IP Address headers (Remote_Addr) - When is this header sent by the browser? I want to know when a browser includes the header - Remote_Addr in the HTTP request. I observed the request sent

@Si4351233

Posted in: #Firefox #Http #HttpHeaders

I want to know when a browser includes the header - Remote_Addr in the HTTP request. I observed the request sent by the browser on loading stackoverflow.com, in the web console window of Firefox. There were no headers pertaining to IP address sent. So, does this mean the browser never sends this header along with a HTTP request?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

In client-server applications, the IP address of the client (i.e., the browser) is sent via the socket connection (the request) to the server (e.g., Apache). If the client is using a proxy server however, that may be the proxy's IP address instead of the client's IP.

Remote_Addr is an ENV returned by the server and available to server-side scripts/applications, not the client browser.

In PHP, you can use something like $_SERVER['REMOTE_ADDR'] to obtain the IP address of the client. In Perl you can use something like $ENV{'REMOTE_ADDR'};

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme