Open In App

HTTP headers | Forwarded

Last Updated : 11 May, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

HTTP headers allow client and server to pass supplementary information with an HTTP request or HTTP response. Headers can be classified according to their context. General headers contain information about both request and response but no relation with the data being transmitted. Request headers contain information about the client requesting the resource and Response headers consist of information regarding the response or the server that provides the resource. There are entity-headers that consists information about the content or body of resource. 

 

  • It is used to reveal authentic information of a user that connects to web by an HTTP proxy.
  • It consists of data of the proxy servers from the client-side (that is changed or lost) whenever a proxy is engaged in the request path. It comes under Request header category.
  • The alternative versions of this header field are X-forwarded-Proto, X-forwarded-For, X-forwarded-Host headers.
  • By its design, this header reveals confidential information of a client such as IP address. Therefore, care must be taken while deploying this header.
  • It is used for making location-dependent content, debugging and statistics.

Syntax :

Forwarded: 
by=<identifier>;for=<identifier>;host=<host>;proto=<http | https>

Directives : This header accept  five parameter as mentioned above and described below:

  • <identifier> 
    An identifier discloses the information related to any change or loss while using proxy. They can be:
    • IP address ( an IPV4 or IPV6 )
    • a mystifying identifier (like “_hidden” or “_secret”)
    • an unknown when prior entity is not known
  • by=<identifier> 
    It is a place where a request comes into the proxy server.
  • for=<identifier> 
    The request and the following proxies have been started by client.
  • host=<host> 
    Request header field “host” received by proxy is shown.
  • proto=<http | https> 
    It explains which protocol has been used to make a request(whether http or https)

Examples :

Separated by semi-colon .

Forwarded : by=203.0.111.42;for="192.0.3.61";proto=https; 

Not case sensitive .

FORWARDED: FOR="[2003:db4:cafs::17]:4731" 

Multiple values can be attached using a comma .

Forwarded: for=192.0.3.41, for=198.53.103.08 

Supported Browsers: 

Supported browsers are unknown for HTTP header forward


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads