-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
update pfx and passphrase information #1594
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
Conversation
Spent several hours trying to figure out why it didn't work, realized that the documentation was not accurately showing the correct information. I reviewed https://nodejs.org/api/https.html and figured out the correct way to assign these two values. I hope that saves others hours of frustration. Thanks.
@shellscape can you review? Happy to merge but I'd like to confirm with someone who is more familiar with advanced |
You can specify the pfx and passphrase options like that, but it's not required when |
@shellscape The certificate is not trusted when just setting I created my own pfx and loaded it to the Trusted Root Certification Authority under my user account in Windows 10, now the browsers (IE & Chrome) trust my self-signed certificate. I would think we should continue to encourage people to create their own certificates. I don't know how common it is for people to run the WDS in https, I had to do this for my workflow to work as intended. |
@shellscape Thanks for clarifying, I understand now. However, setting My options are:
|
@navarrorc I'd say that's correct. if we look at the CLI for webpack-dev-server, it's doing the same: https://github.com/webpack/webpack-dev-server/blob/master/bin/webpack-dev-server.js#L315 So for the CLI, just providing the relative path should be enough. For using the API directly, reading the file contents is needed. This is one of many discrepancies between the API and CLI that have crept into the project over the years. |
Closing, as I actually think #1595 resolves this issue quite nicely. @navarrorc @shellscape please correct me if I'm wrong or feel free to submit a follow up pr with more to elaborate. |
Spent several hours trying to figure out why it didn't work, realized that the documentation was not accurately showing the correct information. I reviewed https://nodejs.org/api/https.html and figured out the correct way to assign these two values. I hope that saves others hours of frustration. Thanks.