Documentation
¶
Overview ¶
Package sameorigin tells a request of a page of another origin from one of the machine's own pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrossSite ¶
CrossSite says whether a request comes from a page of another origin. It guards what a person's session must not do for any page that asks: the sockets, which open a terminal on the machine, and the writes beside them. A browser sends the session cookie to a request of any site, so the cookie alone proves nothing about who asks.
Sec-Fetch-Site is the browser's own word and decides alone when it is there: same-origin (or none: the person typed the address) passes, same-site (a sibling subdomain, a preview stand) and cross-site do not. Without it, an Origin header must name the host asked (or the host a proxy in front was asked as). A request with neither is not a browser's, and it has its own credentials to show.
Types ¶
This section is empty.