Skip to content

Fix Origin header check #38

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

Merged
merged 2 commits into from
Jul 1, 2025
Merged

Fix Origin header check #38

merged 2 commits into from
Jul 1, 2025

Conversation

c2h5oh
Copy link
Collaborator

@c2h5oh c2h5oh commented Jun 26, 2025

  1. Require Origin header to be set to consider a request to be a preflight request
  2. Allow empty Origin header - see note https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS#origin

@c2h5oh c2h5oh force-pushed the origin_header_check branch from 5f89c00 to 2258c81 Compare June 26, 2025 17:35
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

Looks good.

CORS pre-flights require both Origin and Access-Control-Request-Method headers. 👍

@VojtechVitek VojtechVitek merged commit 3a53812 into master Jul 1, 2025
18 checks passed
@VojtechVitek VojtechVitek deleted the origin_header_check branch July 1, 2025 14:06
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