HTTP headers | Origin

The Origin HTTP Header is a response HTTP header that indicates the security contexts that initiates an HTTP request without indicating the path information. The Origin header is added by the browser and can not be controlled by the user.

Syntax:

Origin: <scheme> "://" <hostname> ":" <port> 

Directives:



  • <scheme>:
  • This is usually the HTTP or HTTPS protocol that is used.

  • <hostname>:
  • This is the IP or domain name of the server.

  • <port>:
  • This is an optional directive that tells Transmission Control Protocol port number of the server. The default port is implied if it is not specified.

Examples:

Origin: null

This means that there is no origin for the service requested.

Origin: https://www.geeksforgeeks.org

This means that the origin if the service requested exists and has https as the scheme and www.geeksforgeeks.org as the hostname.

Supported Browsers The following browsers are compatible with HTTP Origin:

  • Google Chrome
  • Internet Explorer
  • Opera
  • Firefox
  • Safari


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.