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 a CORS middleware #523

Merged
merged 1 commit into from
Nov 18, 2022
Merged

Add a CORS middleware #523

merged 1 commit into from
Nov 18, 2022

Conversation

fabricedesre
Copy link
Contributor

Fixes n0-computer/beetle#76

This uses the headers from the gateway config. access-control-allow-headers and access-control-expose-headers are usually the same so we allow omitting the second, less known one. Without it, headers specified in access-control-allow-headers are not visible in fetch() responses even if they are sent back.

@fabricedesre
Copy link
Contributor Author

cc @Arqu

Copy link
Collaborator

@Arqu Arqu 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!

@Arqu Arqu merged commit 2f0f4f4 into n0-computer:main Nov 18, 2022
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.

Wire up CORS config to a CORS middleware
2 participants