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

fix(cors): append access-control-max-age header to preflight response #856

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

aaharu
Copy link
Contributor

@aaharu aaharu commented Aug 8, 2024

resolves #854

@aaharu aaharu requested a review from pi0 as a code owner August 8, 2024 06:43
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.45%. Comparing base (a58d7c9) to head (4ba3732).
Report is 177 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #856      +/-   ##
==========================================
+ Coverage   77.83%   79.45%   +1.62%     
==========================================
  Files          47       43       -4     
  Lines        4286     3291     -995     
  Branches      611      797     +186     
==========================================
- Hits         3336     2615     -721     
+ Misses        933      673     -260     
+ Partials       17        3      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pi0
Copy link
Member

pi0 commented Aug 29, 2024

Can you please add a regression test?

@pi0 pi0 changed the title fix: append access-control-max-age header to preflight response fix(cors): append access-control-max-age header to preflight response Aug 29, 2024
@aaharu
Copy link
Contributor Author

aaharu commented Aug 30, 2024

I added tests and fixed the Access-Control-Expose-Headers issue as well.
https://fetch.spec.whatwg.org/#http-responses

An HTTP response to a CORS request that is not a CORS-preflight request can also include the following header:

Access-Control-Expose-Headers

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.

handleCors's maxAge option has no effect
2 participants