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

localConfig.json is loaded from multiple locations via an explicit URL - including from within the MapStore2 submobule #3920

Closed
zachsa opened this issue Jul 8, 2019 · 3 comments

Comments

@zachsa
Copy link

zachsa commented Jul 8, 2019

After creating a standard project, and looking at app.jsx (https://github.com/geosolutions-it/MapStore2/blob/master/project/standard/templates/js/app.jsx), there are instructions on using custom configuration files:

/**
 * Use a custom plugins configuration file with:
 *
 * ConfigUtils.setLocalConfigurationFile('localConfig.json');
 */
ConfigUtils.setLocalConfigurationFile('MapStore2/web/client/localConfig.json');

However, after copying the contents of ./MapStore2/web/client/localConfig.json to localConfig.json and deleting the source file (just to make sure that the configuration isn't loaded in 2 places), I find that, indeed, the localConfig.json file is loaded via explicit path in at least one additional place: https://github.com/geosolutions-it/MapStore2/blob/master/web/client/jsapi/MapStore2.js

Is this a bug?

Because if I were to use my own localConfig.json file, then the app would load 2 potentially conflicting config files...

On another note. What exactly does this configuration file actually do? I see mention of CORS. Is this where we provide a list of allowable origins for a CORS whitelist? This also looks like the place where I would want to specify endpoints to my own data.

If these are correct then I definitely would like to move these files from the submodule to the root of my project. And I definitely WOULDN'T like an older copy of this file loaded for some other reason in the application.

This looks like it could be related to issue #3688

@mbarto
Copy link
Contributor

mbarto commented Jul 8, 2019

Good Morning @zachsa, could you please use the mailing lists for asking questions and discuss with the developers?
We usually open an issue on github only after we have identified a bug / needed improvement, and this usually happens after some discussion on the mailing lists.
Thanks

@mbarto mbarto closed this as completed Jul 8, 2019
@zachsa
Copy link
Author

zachsa commented Jul 8, 2019

Apologies - will do

@zachsa
Copy link
Author

zachsa commented Jul 8, 2019

For anyone else who see this, here is documentation on what localConfig.json does: https://mapstore.readthedocs.io/en/latest/developer-guide/local-config/

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

No branches or pull requests

2 participants