Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #942 from webpack/ssl-path
Ssl path
- Loading branch information
Showing
6 changed files
with
69 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
/client/index.bundle.js | ||
/client/sockjs.bundle.js | ||
/coverage | ||
*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
# https | ||
|
||
By default webpack-dev-server will generate a self-signed, 2048 bit, sha256 SSL | ||
Certificate, which is used to enable https. The certificate will be located in the | ||
`ssl` directory afte the server is started for the first time. The generated | ||
certificate is only good for 30 days, at which point it'll be regenerated. | ||
|
||
We highly recommend creating and managing your own certificates. Please see the | ||
following resources for doing so: | ||
|
||
* (MacOS) https://certsimple.com/blog/localhost-ssl-fix | ||
* (Windows) https://technet.microsoft.com/itpro/powershell/windows/pkiclient/new-selfsignedcertificate | ||
|
||
## Getting Started | ||
|
||
```shell | ||
node ../../bin/webpack-dev-server.js --open --https | ||
``` | ||
|
||
A fake certificate is used to enable https. | ||
## Using Your Certificate | ||
|
||
Options are available for using your own SSL Certificate in your preferred or | ||
OS-required format. | ||
|
||
You can provide the following SSL options to override the fake certificate: | ||
Given the base command `node ../../bin/webpack-dev-server.js --open --https`, append | ||
one of the following: | ||
|
||
* Certificate options e.g. `node ../../bin/webpack-dev-server.js --open --https --cert=../../ssl/server.pem --key=../../ssl/server.pem` | ||
* PFX and Passphrase e.g. `node ../../bin/webpack-dev-server.js --open --https --pfx=./test_cert.pfx --pfx-passphrase=sample` | ||
* (PEM Files) `--cert=../../ssl/server.pem --key=../../ssl/server.pem` | ||
* (PFX and Passphrase) `--pfx=./test_cert.pfx --pfx-passphrase=sample` | ||
|
||
## What should happen | ||
## What To Expect | ||
|
||
The script should open `https://localhost:8080/`. Your browser will probably give you a warning about using an invalid certificate. After ignoring this warning, you should see "It's working." | ||
The script should open `https://localhost:8080/`in your default browser. If your | ||
browser displays a warning about a non-trusted certificate, follow the procedure | ||
for your browser of choice to continue. After doing so you should see "It's Working" | ||
displayed on the page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.