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

Add Last-Event-ID to CORS-safelisted headers #49257

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rexxars
Copy link
Contributor

@rexxars rexxars commented Nov 19, 2024

The EventSource API does not run any preflight request when specifying the Last-Event-ID header, and so fetch requests should also allow this header to be set manually.

See issue whatwg/fetch#568 for more information and PR whatwg/fetch#1788 for changes to the specification

Copy link
Member

@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.

I think we also need an actual cross-origin EventSource test where the ID gets set to a value that doesn't match the requirements.

fetch/api/cors/resources/not-cors-safelisted.json Outdated Show resolved Hide resolved
The EventSource API does _not_ run any preflight request when specifying
the `Last-Event-ID` header, and so `fetch` requests should also allow
this header to be set manually.

See whatwg/fetch#568 for more information
@rexxars rexxars force-pushed the fetch-cors-safelist-last-event-id branch from 746a146 to 79c1fed Compare November 20, 2024 21:55
@rexxars
Copy link
Contributor Author

rexxars commented Nov 20, 2024

I think we also need an actual cross-origin EventSource test where the ID gets set to a value that doesn't match the requirements.

Makes sense - added in c80e8b3

@rexxars rexxars force-pushed the fetch-cors-safelist-last-event-id branch from 79c1fed to c80e8b3 Compare November 20, 2024 22:12
@rexxars rexxars requested a review from annevk November 21, 2024 23:05
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.

2 participants