-
Notifications
You must be signed in to change notification settings - Fork 191
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
feat: add an utility function to get protocol #306
Comments
I would like to work on this @NozomuIkuta |
Please feel free to submit a PR 👍 |
Sure @NozomuIkuta . Please assign me |
I guess we don't use |
Thanks a lot... I would start immediately |
How would you like the function to be? @NozomuIkuta @pi0 |
IMHO, migrating Other related functions (e.g. You might want to submit a PR anyway based on your ideas and start a discussion in PR thread. Whichever, @pi0 have the right to determine the final spec as the author of h3 (according to unjs governance policy). As for contribution, here are summary for you at the moment:
By the way, at the moment, Development section of unjs/template would correspond to You are also welcomed to submit a PR to enhance h3 README, and to unjs/template for future unjs packages. |
Describe the feature
h3 has some kinds of utility functions to get information about the request (e.g.
getMethod()
).It would be also good to have that utility function(s) to get protocol of the request. Currently, we have to install another unjs package,
is-https
package, to detect HTTPS, or implement similar logic by ourselves.So, exporting such functionality, like
getProtocol
orisHTTPS
, from h3 would be beneficial for developers in terms of DX.cf. built-in CORS support (#82) vs. my CORS package
More generally, we might want to create an issue where we can discuss what kind of middlewares and utility functions should be exported from h3, rather than providing them as 3rd-party package.
Additional information
The text was updated successfully, but these errors were encountered: