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 missing CORS header in preflight response example #32137

Merged
merged 2 commits into from
Feb 11, 2024

Conversation

corgeman
Copy link
Contributor

@corgeman corgeman commented Feb 6, 2024

Description

The preflight request page's example sends an Access-Control-Request-Headers header, but the example response does not contain an Access-Control-Allow-Headers which is required. This PR simply adds one.

Motivation

Readers may believe that a server (wanting a preflight request to succeed) doesn't need to respond with an Access-Control-Allow-Headers header if the client sends an Access-Control-Request-Headers header.

Additional details

N/A

Related issues and pull requests

N/A

The example preflight request sends an `Access-Control-Request-Headers` header, but the example response does not contain an `Access-Control-Allow-Headers` which is required as per https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers . This PR simply adds one.
@corgeman corgeman requested a review from a team as a code owner February 6, 2024 06:31
@corgeman corgeman requested review from hamishwillee and removed request for a team February 6, 2024 06:31
@github-actions github-actions bot added Content:Glossary Glossary entries size/xs [PR only] 0-5 LoC changed labels Feb 6, 2024
Copy link
Contributor

github-actions bot commented Feb 6, 2024

Preview URLs

(comment last updated: 2024-02-11 23:06:27)

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Thank you very much - and welcome to MDN

@hamishwillee hamishwillee merged commit 9902715 into mdn:main Feb 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Glossary Glossary entries size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants