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 HTTPS/HTTP2 server #422
Conversation
cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I bet this has another noticeable perf impact for large apps
I modified the code slightly. Running
I think this provides a bit more seamless solution. If we want to make the user more aware of the generated Personally, I prefer the more seamless approach but either is fine with me. |
One concern that I have using the Also, I didn't add the section of changing the process id for installing the rootCA automatically in the keychain. This felt a bit awkward so instead, I left the For better cross-platform usage, we may want to look into using |
@stramel If we're worried about the stability of this (especially the fact that it can't run on Windows) lets pull that logic out for now and just give explicit commands that the user can run if they need to generate. IE:
I think this may even be the best long-term solution as well. I mentioned elsewhere, but based on what I've seen I don't think we have the resources to maintain a custom integration that handles automatic generation & connecting that to your internal key store all perfectly within Snowpack. |
@FredKSchott I did a bit of formatting on the error message. Feel free to clean it up however you see fit. Also, I opened an issue on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for tackling, this is great! Assuming you've been able to test this running locally, feel free to merge when ready |
Fixes #399
This will generate an HTTP2 server when using the
--secure
flag.It will check the directory for a
snowpack.cert
andsnowpack.key
file and if not found will generate a local set to use.Also, swapped the ETag over to use the weak option since we're using compression now. Missed in my previous PR #419
@FredKSchott I'm a bit unsure of how to get the files to output to the built files and wasn't sure where we wanted to look for/generate files. I was also not entirely sure the best way to resolve paths to files in Node. Those are the main things left to make this work.
A lot of this work is utilizing the work from servor.
NOTE: On Chrome, once I switched to the HTTP2 server, it seems like it was randomly not sending the
if-none-match
header. However, Firefox, continued to work fine.