Skip to content

Commit 25e1098

Browse files
committed
updating https docs
1 parent 400b289 commit 25e1098

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

examples/https/README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
# https
22

3+
By default webpack-dev-server will generate a self-signed, 2048 bit, sha256 SSL
4+
Certificate, which is used to enable https. The certificate will be located in the
5+
`ssl` directory afte the server is started for the first time. The generated
6+
certificate is only good for 30 days, at which point it'll be regenerated.
7+
8+
We highly recommend creating and managing your own certificates. Please see the
9+
following resources for doing so:
10+
11+
* (MacOS) https://certsimple.com/blog/localhost-ssl-fix
12+
* (Windows) https://technet.microsoft.com/itpro/powershell/windows/pkiclient/new-selfsignedcertificate
13+
14+
## Getting Started
15+
316
```shell
417
node ../../bin/webpack-dev-server.js --open --https
518
```
619

7-
A fake certificate is used to enable https.
20+
## Using Your Certificate
21+
22+
Options are available for using your own SSL Certificate in your preferred or
23+
OS-required format.
824

9-
You can provide the following SSL options to override the fake certificate:
25+
Given the base command `node ../../bin/webpack-dev-server.js --open --https`, append
26+
one of the following:
1027

11-
* Certificate options e.g. `node ../../bin/webpack-dev-server.js --open --https --cert=../../ssl/server.pem --key=../../ssl/server.pem`
12-
* PFX and Passphrase e.g. `node ../../bin/webpack-dev-server.js --open --https --pfx=./test_cert.pfx --pfx-passphrase=sample`
28+
* (PEM Files) `--cert=../../ssl/server.pem --key=../../ssl/server.pem`
29+
* (PFX and Passphrase) `--pfx=./test_cert.pfx --pfx-passphrase=sample`
1330

14-
## What should happen
31+
## What To Expect
1532

16-
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."
33+
The script should open `https://localhost:8080/`in your default browser. If your
34+
browser displays a warning about a non-trusted certificate, follow the procedure
35+
for your browser of choice to continue. After doing so you should see "It's Working"
36+
displayed on the page.

0 commit comments

Comments
 (0)