I am building a Progressive Web Application for work, but I am having trouble testing it locally because of the SSL requirements.
Usually, it's simple to do because Chrome allows this to work if you are using localhost (even without SSL I believe). However, I am not using "localhost". We have an internal web application with a URL like this: "website.company.com". When logging into this site, authentication cookies are added for that sub-domain (company.com). For my local website to use these same cookies, I add an entry to the hosts file (Windows) like this "127.0.0.1 my-local-site.company.com". That way when I go to my local site (my-local-site.company.com), I have all the authentication cookies, and I can make CORS calls to my real deployed site.
This works perfectly except for the fact that service workers will not work now because the cert for "https://my-local-site.company.com" is not valid and the service worker doesn't load. I tried creating a self-signed certification and added it to the Trusted certs, but Chrome still says the site is not trusted and the service worker and manifest.json files don't load.
My question is does anyone know how to either: 1. Enable PWA to work fully locally without a valid cert... or 2. Make chrome recognize my self signed cert.
NOTE: I did find a flag in Chrome startup that allows service workers to function without a valid cert, which is great... however, it still does not load my manifest.json file. This is a problem because I really want to demo (to my team) the cool Add to Homescreen functionality of PWA.