[slightlyoff/ServiceWorker] service worker not working for localhost (#915)

When i used http://localhost , and put sw.js file in root directory it works fine. But if i put sw.js file in http://localhost/app_name/ then it says net::ERR_INSECURE_RESPONSE in console and undefined:1 Uncaught (in promise) DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html').

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/915

Received on Thursday, 16 June 2016 13:51:51 UTC