17
votes

Running ionic serve (ionic serve --lab) allows to run the app on http://localhost:8100/ionic-lab

Trying to access https://localhost:8100/ionic-lab results in:

SSL connection error

Is there a way to run the app on https?

I followed the instructions from the link to overcome SSL error, but couldn't figure out how to use it with ionic (i.e. I don't know how to use cert.pem & key.pem files while starting the server with the command ionic serve --lab)

2

2 Answers

2
votes

The dev server can use HTTPS via the --ssl option (experimental).

Run this command:

ionic serve --lab --ssl

There are several known issues with HTTPS. See Issue

0
votes

Have you tried the steps from the official Github issues thread?

To create a self signed cert and run it with a go proxy script https://gist.github.com/scrivy/0909468fde8f117a3d66507c8bb3fe12