-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Milestone
Description
Can you reproduce the problem with latest npm?
Yes.
Description
When set PUBLIC_URL to a cdn address, service worker registration is blocked. It seems a cross-domain problem:
Error during service worker registration: DOMException: Failed to register a ServiceWorker: The origin of the provided scriptURL ('https://o0tu0aq0f.qnssl.com') does not match the current origin ('https://apporz.com').
Expected behavior
ServiceWorker should work well when PUBLIC_URL isn't local host.
Actual behavior
ServiceWorker doesn't work.
Environment
npm ls react-scripts(if you haven’t ejected): [email protected]node -v: v7.10.0npm -v: v4.2.0
Then, specify:
- Operating system: macOS
- Browser and version: Chrome 58.0.3029.110 (64-bit)
Reproducible Demo
See console output on my website.