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 exposedHeaders CORS option #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

BasilVictor
Copy link

When using API endpoints that send information via the response headers, we are not able to access them even though it is recived.

Example

When using a download file API endpoint, the file name was being sent in the Content-Disposition header. When trying to access this information from JavaScript it as returning undefined.

Solution

Thus I have added an --exposedHeaders option which accepts a comma seperated list such as: [Content-Disposition,Date] OR [*] whcih then gives JavaScript client access to the headers.

Thank you for this project 🙏

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.

1 participant