sw-registration.js is fingerprinted incorrectly when rootURL is set.
See original GitHub issueI am trying to setup service workers for an ember 3.4 app. The app is served from a sub directory ‘/mobile/’ so the config/environment.js rootURL
is set to ‘/mobile/’.
In development the sw-registration.js script is added to the index.html page and mobile is prepended. However when deployed via ember-cli-deploy the sw-registration.js is fingerprinted and a incorrect ‘/mobile/’ path is added. (I say incorrect because all other assets are not prefixed by a mobile path).
All assets are fingerprinted and served from a cdn. I am unsure how or if the app should fingerprint the sw-registration.js file.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Frequently Asked Questions (FAQ) About Fingerprint Processing
Firms with questions about using Sterling as their fingerprint collection option should contact Sterling Client Support.
Read more >Developing Remote Plug-ins with the vSphere Client SDK - VMware ...
Developing Remote Plug-ins with the vSphere Client SDK provides information about developing and deploying HTML-5 extensions to the vSphere Client user ...
Read more >googleapis documentation - Google Cloud
The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
Read more >All Classes (Jenkins core 2.374 API) - Jenkins Javadoc
Extension point for adding Captcha Support to User Registration Page ... Filter that sets the character encoding to be used in parsing the...
Read more >draft-ietf-acme-acme-01 - Automatic Certificate Management ...
Existing Web PKI certificate authorities tend to run on a set of ad hoc ... The server acknowledges the registration by replying with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @martndemus for the suggestion. I started to refactor the add-on to omit the rootURL from the sw-registration.js src if the fingerprint prepend option is present. But because _getRootURL() function is used by the sw.js file as well, so I punted.
It turns out there is a config option that handles this better any how. By using the inline registrationStrategy we don’t have to worry about the rootURL being appended to the fingerprint.prepend string.
@jfrux Is that using the PR that we were testing for this issue? https://github.com/DockYard/ember-service-worker/pull/152