Select to view content in your preferred language

Possible to use an URL for the config of a widget ?

2193
1
Jump to solution
04-14-2016 01:11 AM
FlorianCADOZ
Regular Contributor


Hello everyone !

Actually, in the main config.json, you've got a config: "PathOfTheConfigFile.json" for each widget of your app !

This file is located in widgets/nameOfTheWidget/config.json or configs/nameOfTheWidget/config.json and I would like to know if it was possible to give an URL rather a path in this main config file to change dynamicly the configuration of a widget without editing the app ?

Thank you in advance ! 😃

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Florian,

Sure this is possible, if two conditions are meet:

  1. The json file path can not have spaces or other characters that will get encoded or already have them encoded as the path will go though encoding when the ConfigManager attempts to use the path.
  2. The server that the request is going to has to be the same server that the request is coming from OR have CORS enabled.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Florian,

Sure this is possible, if two conditions are meet:

  1. The json file path can not have spaces or other characters that will get encoded or already have them encoded as the path will go though encoding when the ConfigManager attempts to use the path.
  2. The server that the request is going to has to be the same server that the request is coming from OR have CORS enabled.