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

CORS support #82

Closed
carcinocron opened this issue Mar 31, 2022 · 6 comments · Fixed by #322
Closed

CORS support #82

carcinocron opened this issue Mar 31, 2022 · 6 comments · Fixed by #322
Assignees
Labels
enhancement New feature or request

Comments

@carcinocron
Copy link

No description provided.

@pi0 pi0 changed the title CORS example? CORS support Apr 12, 2022
@pi0 pi0 added the enhancement New feature or request label Apr 12, 2022
@pi0 pi0 self-assigned this Apr 12, 2022
@m0ksem
Copy link

m0ksem commented Jun 12, 2022

@pi0. Do you want to work on it? I could make a PR for CORS support.

@NozomuIkuta
Copy link
Member

For your reference, I'm creating h3-native CORS event handler, whose APIs are mostly same as Express CORS middleware.

README is not yet written, but I believe the code is so simple that you can understand what API looks like.

I've implemented basic features and unit tests, and now I need a kind of e2e tests to test CORS works as expected.
Any advice or feedback is welcome.

@NozomuIkuta
Copy link
Member

For your reference, I'm creating h3-native CORS event handler, whose APIs are mostly same as Express CORS middleware.

I published it to npm with additional unit tests and README.

https://www.npmjs.com/package/@nozomuikuta/h3-cors


By the way, this is my first experience of using unjs/template.
I found some points to improve, so I will create issues and submit PRs later.

@NozomuIkuta
Copy link
Member

@pi0
By the way, may I add my package above to Add-on section in README?

@NozomuIkuta
Copy link
Member

h3-cors package provides enough functionality, so I believe it's fine to close this issue for now.

📝 This issue might need to be reopened according to organization members' decision on #259 (exporting middlewares from main repository).

@pi0 pi0 reopened this Dec 13, 2022
@pi0
Copy link
Member

pi0 commented Dec 13, 2022

I think we shall still add cors utility to the h3 main utils. NozomuIkuta/h3-cors#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants