Serve: Enable both manual and automatic HTTPS/SSL mode

Created on 13 Aug 2020  路  3Comments  路  Source: vercel/serve

Why was support(#274) for automatic HTTPS removed? As per #520 and #511 it is understandable that users might want to use manual certs and keys, but there is still, no even more, use cases for automatic SSL/HTTPS. One of the biggest reasons why serve is so popular is because it's a one-line command to literally "serve" your application. If a user wants or for some reason needs HTTPS they don't wanna have to go through a whole process of installing another tool just to get it.

Personally I stumbled upon serve when building my create-react-app and wanted to "serve" it. But because I use service workers and push notifications I need to serve it over HTTPS so I can test on other devices on the network. Sure I can get HTTPS for my self as per #520, but my co-workers can't, since they might not have their own manual certs and keys... you see the problem?

There is no reason why both manual and automatic HTTPS can't be supported.

Most helpful comment

It looks like support was dropped during a rewrite in 2018, whether intentionally or not I don't know :shrug:

For now I'm running serve at version 6 instead (npx serve@6 --ssl ...) and it's working well for my particular use case (serving builds on localhost over HTTPS and running end-to-end tests against them).

All 3 comments

It looks like support was dropped during a rewrite in 2018, whether intentionally or not I don't know :shrug:

For now I'm running serve at version 6 instead (npx serve@6 --ssl ...) and it's working well for my particular use case (serving builds on localhost over HTTPS and running end-to-end tests against them).

For now I'm running serve at version 6 instead (npx serve@6 --ssl ...) and it's working well for my particular use case

lovely :) Thanks for pointing out that version.

I fix and published vercel/[email protected] as npm i ssl-serve.
Repo: https://github.com/TimDaub/ssl-serve

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Olexiy665 picture Olexiy665  路  3Comments

malinda1986 picture malinda1986  路  6Comments

Mugen87 picture Mugen87  路  3Comments

arel picture arel  路  4Comments

TamasHuang picture TamasHuang  路  7Comments