Service workers rely on either being on localhost or on a trusted SSL connection. Recently one of the team working on the football tipster site I run was explaining how they were having issues getting some service workers working properly because in development we use the domain name and the SSL certificate is a self-signed thing that I made on my machine. We can get our local environment to load in an SSL certificate, but it won’t be valid. Often we will have to work around the fact that SSL certificates in development don’t pass muster.
This might be common knowledge in the web development community but today I am going to show you a quick trick to get your Mac to accept staging or development SSL certificates as if they were production certs.