How Heroku is turning my http express server into the https server?

Viewed 63

Problem

I made an express server with app.listen as following:

app.listen(config.PORT, _ => { console.log(`Server started at port # ${config.PORT}`)})

I deployed it on Heroku.

Now it is working with https. Check out: https://dnt-ecommerce.herokuapp.com/

I checked the requests in the browser devtools and it was still https

Question

How come my http express server is serving https requests by the frontend?

GitHub Rep https://github.com/siddiqian/dntstores-ecommerce

1 Answers

https://devcenter.heroku.com/changelog-items/1815

As it says.... https works on .heroku.com even when we configure a custom domain. So its a default feature (thanks to heroku). HTTPS will stop working on .herokuapp.com when we Configure SSL on a Custom Domain and manually upload your own certificate.

Related