Skip to content

Origin outside of CORS and interaction with the Referrer Policy - #14260

Merged
annevk merged 2 commits into
masterfrom
annevk/origin-header
Jun 27, 2019
Merged

annevk merged 2 commits into
masterfrom
annevk/origin-header

Conversation

@annevk

@annevk annevk commented Nov 27, 2018

Copy link
Copy Markdown
Member

No description provided.

@annevk

annevk commented Nov 27, 2018

Copy link
Copy Markdown
Member Author

Please ignore the lack of DRY for now, that will be cleaned up.

I'm curious about three things myself:

  • Why do browsers have the results they do? (Note that the expectations are written to follow what Chrome does.)
  • What scenarios do we need to cover? (HTTPS to HTTP isn't covered, affect of referrer policy, if any, isn't covered. Same-origin isn't covered.)
  • What changes are needed to step 5.10 of https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch to account for the way browsers generate Origin.

@mikewest @youennf @yutakahirano I hope you'll be able to help here.

Comment thread fetch/origin/no-cors.any.js Resolved
Comment thread fetch/origin/no-cors.any.js Resolved
Comment thread fetch/origin/no-cors.any.js Resolved
@annevk

annevk commented Jan 10, 2019

Copy link
Copy Markdown
Member Author

Hey @JuniorHsu, thanks for taking a look. I removed the detailed descriptions for now as they're mostly wrong and I guess we haven't quite decided what behavior we want anyway. I also found a way to make final test consistently run across browsers (there's a difference between how browsers deal with newly appended frames unfortunately).

Are you still planning on writing more tests around this to figure out what kind of Origin header we want for the non-CORS scenarios?

@annevk

annevk commented Apr 18, 2019

Copy link
Copy Markdown
Member Author

This PR now includes all @JuniorHsu's great work. Next step is figuring out the spec and then making sure this PR is aligned with what we agree on there and then filing the various implementation bugs required.

If folks want to review the additions meanwhile that'd be great!

@annevk annevk changed the title WIP: figuring out Origin outside of CORS Origin outside of CORS and interaction with the Referrer Policy Jun 19, 2019
@annevk
annevk force-pushed the annevk/origin-header branch from 05ec7bd to 10336a5 Compare June 19, 2019 11:37
@annevk

annevk commented Jun 19, 2019

Copy link
Copy Markdown
Member Author

@JuniorHsu this now includes your fetch() test and I rebased on master so that the latest tooling is used when building.

Did you get closer with the intermittent issue in Firefox? Will you work on splitting this test?

@JuniorHsu

Copy link
Copy Markdown
Contributor

@JuniorHsu this now includes your fetch() test and I rebased on master so that the latest tooling is used when building.

Did you get closer with the intermittent issue in Firefox? Will you work on splitting this test?

I send another PR
#17407

Ensure we have more coverage for how to set the Origin header outside of
CORS. And also how its value is impacted by Referrer Policy.

Fetch change: whatwg/fetch#908.

Co-authored-by: Junior Hsu <cuveehsu@gmail.com>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
@annevk
annevk force-pushed the annevk/origin-header branch from a17b10f to 36d1449 Compare June 27, 2019 07:45
@annevk
annevk merged commit ef44bff into master Jun 27, 2019
@annevk
annevk deleted the annevk/origin-header branch June 27, 2019 09:36
annevk pushed a commit to whatwg/fetch that referenced this pull request Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants