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

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

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

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

@ryanto

This comment has been minimized.

Copy link
Member

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

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@st-h

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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
Projects
None yet
2 participants
You can’t perform that action at this time.