Why would you do this? Every browser API that requires a secure context works on localhost even without setting up HTTPS on it.
There are many problems that this video solves. Sometimes you want to use a custom domain for localhost testing but you don't want to use 'localhost'. In that case the API simply doesn't work and service worker also stops.
Biggest reason I had for this was testing CORS configuration. Too many posts on SO show how to "enable all origins", but that's really not the point.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why would you do this? Every browser API that requires a secure context works on localhost even without setting up HTTPS on it.
There are many problems that this video solves.
Sometimes you want to use a custom domain for localhost testing but you don't want to use 'localhost'. In that case the API simply doesn't work and service worker also stops.
Biggest reason I had for this was testing CORS configuration. Too many posts on SO show how to "enable all origins", but that's really not the point.