MrBenJ / webpack-dev-server-qr-code-plugin

Prints a QR Code to your terminal if you're using webpack-dev-server once you're done compiling. No more typing in IP addresses!
11 stars 2 forks source link

Plugin does not take into account HTTPS servers types #6

Open loicraux opened 1 year ago

loicraux commented 1 year ago

I have the following setup in my webpack config file :

server: {
    type: 'https',
    options: {
        key: readFileSync(getHttpsServerOptionFilePath('localhost-certificate-key.pem')),
        cert: readFileSync(getHttpsServerOptionFilePath('localhost-certificate.pem'))
    }
},

As you can see, I am serving the local IPv4 LAN address with https, using a locally self signed cert (with mkcert).

But your plugin has hardcoded the http:// protocol for the address... See this line

MrBenJ commented 1 year ago

Hi @loicraux !

Thanks for bringing this issue to my attention. At this time, I don't have the bandwidth to dig into this particular issue for you right now, as I haven't touched this in 4-5 years.

This plugin doesn't account for usage of https as it was out of the scope the time this plugin was made. If you'd like to make a pull request to add this functionality, I'll be happy to review it.