Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack-dev-server certificate expired?

In my webpack.config.js file, I added https configuration:

devServer: {
    historyApiFallback: true,
    contentBase: './',
    https: true
}

Then I receive an error when I navigate to https://localhost:8080/

Your connection is not private

Attackers might be trying to steal your information from localhost (for example, passwords, messages, or credit cards). NET::ERR_CERT_AUTHORITY_INVALID
Subject: webpack
Issuer: webpack
Expires on: Dec 10, 2015
Current date: Mar 27, 2016
PEM encoded chain: -----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE----

It appears webpack's certificate expired. Did I configure something incorrectly? Or have I misunderstood SSL?

I'm using

"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.1"
like image 266
anon Avatar asked Mar 01 '26 21:03

anon


1 Answers

EDIT:

As pointed by Markus in the comments, webpack-dev-server generates the certificate automatically since version 2.5.0.


OLD ANSWER:

The problem is that the self-signed certificate of webpack-dev-server expired. This has been fixed in #436.

like image 199
Juho Vepsäläinen Avatar answered Mar 05 '26 06:03

Juho Vepsäläinen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!