Introduce fetching client configuration from a remote JSON file #552
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intro
This introduces the ability for a client to be configured by passing an URL to the
:config
command, like::config https://oskarhane-dropshare-eu.s3-eu-central-1.amazonaws.com/conf-GHrEFakccy/conf.json
If successfully found config params, the
:config
frame shows up with the new config in it (just as before).If any error occurs, an error banner shows up below the editor (new feature introduced with styling support).
To discuss
Two questions that comes up are:
:style
command has no restriction on this.:style
when fetching a new one. We also replace all params when:params {x:2}
.@akollegger @pe4cey ^^
Error banners
User input error i.e.

:config x:
:Error in remote json file format:

Error in remote server headers:

Example files that can be used:
(first, add
oskarhane-dropshare-eu.s3-eu-central-1.amazonaws.com
to your server configbrowser.remote_content_hostname_whitelist
)Correct formatted file with only new config params:
https://oskarhane-dropshare-eu.s3-eu-central-1.amazonaws.com/conf-eKM9GgLJCo/conf.json
Correct formatted file with existing config params in it:
https://oskarhane-dropshare-eu.s3-eu-central-1.amazonaws.com/conf-GHrEFakccy/conf.json
Invalid formatted file:
https://oskarhane-dropshare-eu.s3-eu-central-1.amazonaws.com/conf2-SX8pcCviMC/conf2.json
Non allowed URL (due to their CORS headers):
http://google.com