Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastboot-adapter fails when different domains are used: remove domain and protocol from shoebox key #150

Merged
merged 1 commit into from
Aug 6, 2019

Conversation

st-h
Copy link
Contributor

@st-h st-h commented Aug 6, 2019

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
Copy link
Member

ryanto commented Aug 6, 2019

Yes!!! 👍 Thank you for taking care of this!

@ryanto
Copy link
Member

ryanto commented Aug 6, 2019

Data beta has a bug, that's why tests are failing. I think this is safe to merge though

@ryanto ryanto merged commit 6bed766 into embermap:master Aug 6, 2019
@st-h
Copy link
Contributor Author

st-h commented Aug 6, 2019

@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)

@ryanto
Copy link
Member

ryanto commented Aug 6, 2019

Ok good to hear. I know we have this issue on embermap as well, so I'll give it a try there.

@ryanto
Copy link
Member

ryanto commented Aug 7, 2019

Alright I published this as 0.17.1 🎉 Thanks again for the fix Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants