-
Notifications
You must be signed in to change notification settings - Fork 364
Try to fetch guide remotely if not found locally #483
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
Conversation
7e0a3c4 to
4a6c858
Compare
pe4cey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oskarhane it seems that it only works when connected to the neo4j server.
To recreate: :server disconnect :play arrows
|
@pe4cey Updated |
|
It'd be great to have your view on this feature and implementation @akollegger. Should the config be moved to server config to have it centralized? |
|
Well, wdyt about two things:
|
|
I like the idea of using the whitelist as a search path @akollegger. Also, there might be the case where the browser isn't connected to a server (we might not even know the server url) and what should happen in that case? That's why I made it a client side config in the first place. |
9ca56f8 to
8c3737a
Compare
8c3737a to
95bc354
Compare
|
This is now ready for review again @pe4cey (and more comments if you have any @akollegger). |
95bc354 to
e68bf2f
Compare
|
Rebased @pe4cey |
e68bf2f to
9dc51ed
Compare
When trying to play a local guide:
:play recoand it isn't found, an attempt to find it on the urlbrowser.remote_content_hostname_whitelist + nameis made.browser.remote_content_hostname_whitelistis a server configuration list of hosts (or urls:s) that the browser can fetch remote content from.The default value for
browser.remote_content_hostname_whitelistislocalhost,guides.neo4j.com, so the above play command would resolve and display the reco guide hosted on https://localhost/reco, then on http://localhost/reco, then on https://guides.neo4j.com/reco and finally on http://guides.neo4j.com/reco.It stops after the first successful fetch.
The steps followed are:
browser.remote_content_hostname_whitelistSome updates to on how we use
isomorphic-fetchare added as well, so errors are thrown when we hit a non 200 status from a request.