We have an application that has several white solutions for customers, that is, they are placed in their own domain.
We have one Cordova application, and we want users to be able to visit all these sites using this application , but . I do not want to relocate every time we sign a new client.
- Is there a way to download a whitelist via a url or something else? This means that we can add domains on the fly through our database.
- Is there a huge security risk when using the whitelist of all URLs?
https://cordova.apache.org/docs/en/latest/guide/appdev/whitelist/
Example
To clarify, I would like to have something like a URL where you can specify where it loads every time you run the whitelist settings.
http://myexampledomain.com/whitelist.config
<allow-navigation href="*.myexampledomain.com/*" />
<allow-navigation href="*.subdomain.someclientdomain.com/*" />
<allow-navigation href="*.subdomain.someclientdomainb.com/" />
<allow-navigation href="*.subdomain.someclientdomainc.com/" />
... this file will be automatically loaded at startup.
Creating a plugin based on JS
If the current solution does not exist, is it possible to do this safely by creating the Cordova plugin (based on JavaScript)? How to redirect manually when the url we are trying to download is outside the whitelist?
This means that we would still save Cordoba and use our own plugin to block everything outside of our own whitelist.
( , , , . )