I have created an Angular 10 project in Visual studio code but when I run the command; $ ng serve --open
it opens https://localhost:4200/
in Google Chrome but it shows the following error ERR_SSL_PROTOCOL_ERROR
.
However, in the Angular CLI it shows http://localhost:4200/
. Why is my browser using the HTTPS protocol and not HTTP?
When I clear my browser history, clear temp and then restart my machine it works properly on http://localhost:4200/
. But after some time it starts running on https://localhost:4200/
and fails to load application with same error ERR_SSL_PROTOCOL_ERROR
.
Any idea if I have to change any browser settings or I have to add any configuration in code?
Note: I am running my Web API in another Visual Studio code on locally which I am calling from my angular app. It also shows the same error sometimes.