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

Return allowed CORS headers in the letter case they were submitted in and update the test #29682

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

sberyozkin
Copy link
Member

@sberyozkin sberyozkin commented Dec 5, 2022

Fixes #16208

This PR updates the CORS test checking that if quarkus.http.cors.headers property matches the headers provided in the CORS request then a correct list of headers will be returned.

Additionally, a minor update to the CORS filter was made to ensure the letter case is preserved, example, if the browser sends Access-Control-Request-Headers: x_custom and Quarkus approves it using its case-insensitive headers match, then it should get back Access-Control-Allowed-Headers: x_custom, not Access-Control-Allowed-Headers: X_CUSTOM, the same with content-type vs CONTENT-TYPE as either the browser or Quarkus can have a lower-case or upper-case header value provided/configured

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 5, 2022

Failing Jobs - Building bd521fc

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

@gsmet gsmet merged commit 1f82dd9 into quarkusio:main Dec 6, 2022
@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Dec 6, 2022
@gsmet gsmet modified the milestones: 2.16 - main, 2.15.0.Final Dec 6, 2022
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.

CORS Preflight responses missing Access-Control-Request-Headers
3 participants