Set "origin" header from ResourceRequest::RequestorOrigin
In BaseFetchContext, "origin" header is set from - FetchContext's security origin, or - the referrer string. On the other hand, https://fetch.spec.whatwg.org/#http-network-or-cache-fetch says: If the CORS flag is set, httpRequest’s method is neither `GET` nor `HEAD`, or httpRequest’s mode is "websocket", then append `Origin`/the result of serializing a request origin with httpRequest, to httpRequest’s header list. This CL makes it a bit more spec conformant by setting the header based on ResourceRequest::RequestorOrigin. Bug: 914739 Change-Id: Ia911ca1f2efaf2be080d891b1258f87230d57f2d Reviewed-on: https://chromium-review.googlesource.com/c/1388344 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by:Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:
Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#626889}
Showing
Please register or sign in to comment