[w3c/ServiceWorker] Cross origin error due to htaccess restrictions (#1181)

Sorry for the intrusion but I  just spent a few days with an issue where Firefox threw an error for service worker registration as my htaccess files had restrictions for requests OUTSIDE of the domain accessing non-white listed files (index.html etc).

To clarify - calling 

`navigator.serviceWorker.register('test_worker.js')`

Failed with the error 

> Service Worker Error DOMException [SecurityError: "The operation is insecure." code: 18 nsresult: 0x80530012]

Allowing the test_worker.js to be accessed directly from outside the host fixed the error. 

This was not required with Chrome. I find it a bit strange.

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

Received on Wednesday, 9 August 2017 04:43:18 UTC