Skip to content

fix: check for default headers before appending to cors header failures#4015

Merged
provinzkraut merged 3 commits intolitestar-org:mainfrom
saska:main
Feb 27, 2025
Merged

fix: check for default headers before appending to cors header failures#4015
provinzkraut merged 3 commits intolitestar-org:mainfrom
saska:main

Conversation

@saska
Copy link
Copy Markdown
Contributor

@saska saska commented Feb 18, 2025

Description

  • Some clients sometimes apparently (AFAIK needlessly) check OPTIONS even if they only have CORS-safelisted headers to ask about; I ran into this with Dio. I see no reason to allow I guess?

Closes

@saska saska requested review from a team as code owners February 18, 2025 20:14
@saska saska changed the title check for default headers before appending to cors header failures fix: check for default headers before appending to cors header failures Feb 18, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.34%. Comparing base (c5dbb6c) to head (209c843).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4015   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         348      348           
  Lines       15823    15824    +1     
  Branches     1748     1748           
=======================================
+ Hits        15561    15562    +1     
  Misses        125      125           
  Partials      137      137           

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

@saska
Copy link
Copy Markdown
Contributor Author

saska commented Feb 18, 2025

i.e. dio sent this OPTIONS
image

Copy link
Copy Markdown
Member

@provinzkraut provinzkraut 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, except for the unrelated change. Can you remove that?

@provinzkraut provinzkraut enabled auto-merge (squash) February 27, 2025 19:18
@provinzkraut provinzkraut merged commit f393a17 into litestar-org:main Feb 27, 2025
26 checks passed
@github-actions
Copy link
Copy Markdown

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants