Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fastboot-adapter fails when different domains are used: remove domain and protocol from shoebox key #150
When an ember is run in fastboot mode and the ember-data adapter contains a conditional to use an internal domain in fastboot mode (within the private network) and a public domain (used by the browser), ember-data-storefront fails to recognise data on the browser which is available in the shoebox.
Reason for this behaviour is that the full url (containing both the protocol and the host) is used to store the data within the shoebox. The browser now tries to lookup that data using its public domain, whereas all data on the fastboot server has been stored using the private domain.
This PR removes both the protocol as well as the domain from the url that is used within the shoebox key.
@ryanto I just deployed my app with a dependency to the fork, which is running without issues so far. There should not be much that could go wrong (other than failing to provide a url at all - we could still add a check for that, but this would eventually prevent the fastboot-adapter from working at all anyway)