Re: [whatwg/fetch] Should request's origin be exposed to javascript (#272)

> 2) A Request can theoretically be constructed in one origin and passed to fetch() in another origin. Would the Request.origin be the origin of construction or something added by the browser when fetch() is invoked? What if a ForeignFetchEvent.request is serialized to Cache, then later pulled back out and used in a new fetch()? What would its origin be then? We could figure all this out, but I think it would be easier to just put the origin on the event.

A request already has an origin. It is most of the time initialized to "client", and updated by fetch() to match the origin of the client that called fetch(). Very similar to how the referrer of a request is dealt with (similarly initialized to "client', updated to the actual referrer when fetch() is called). And fetch already uses this origin for various CORS related checks, so all implementations should already be keeping track of this origin anyway. My question here is how the origin of the request should be exposed to javascript.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/272#issuecomment-205554735

Received on Tuesday, 5 April 2016 00:13:38 UTC