Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip CORS checks when preflight is only for PNA #123

Conversation

johnathan79717
Copy link
Collaborator

Fixes #116.

Copy link

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes some sense, but it doesn't seem acceptable to define it like this long term. I suspect the model is something like this:

  1. No preflight.
  2. CORS preflight.
  3. PNA preflight.
  4. PNA + CORS preflight combined (as sending two separate preflights would be wasteful).

I suspect what we want is a single PNA-and-CORS-preflight fetch to replace the existing CORS-preflight fetch and that takes a mode parameter of sorts which enforces which headers get added and such.

And that will also require quite extensive changes to the CORS protocol section as now it's the PNA + CORS protocol.

@iVanlIsh
Copy link
Collaborator

iVanlIsh commented Feb 1, 2024

The changes make sense to me. However, I would suggest asking some preflight/CORS experts and see if we really need to make PNA preflight into a new and different protocol. IMHO, the difference between CORS and PNA is not big enough to make them into two separate stuff.

@johnathan79717 johnathan79717 merged commit e36babb into WICG:main Feb 1, 2024
2 checks passed
@johnathan79717 johnathan79717 deleted the skip-cors-checks-for-pna-only-preflights branch February 1, 2024 19:04
github-actions bot added a commit that referenced this pull request Feb 1, 2024
…only-preflights

SHA: e36babb
Reason: push, by johnathan79717

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skip CORS header checks for preflights only sent for PNA
3 participants