Fa schermo/callback/cordova ha una whitelist su tutte le piattaforme? È implementato allo stesso modo su ciascuno?Qual è lo stato di whitelisting in phonegap 1.3.0?
risposta
La lista bianca è presente sia su iOS che su Android, ma non su altre piattaforme ancora.
Sotto iOS, che va sotto il nome di "host esterni", che viene qui spiegato: http://wiki.phonegap.com/w/page/41631150/PhoneGap%20for%20iOS%20FAQ
Q. Links to and imported files from external hosts don't load?
A. The latest code has the new white-list feature. If you are
referencing external hosts, you will have to add the host in PhoneGap.plist
under the "ExternalHosts" key. Wildcards are ok. So if you are connecting to
"http://phonegap.com", you have to add "phonegap.com" to the list (or use the
wildcard "*.phonegap.com" which will match subdomains as well).
Ad esempio:
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
Per Android, la funzione è attualmente non documentata e un po 'buggy, anche se sottoposto a correzioni. Questo thread contiene alcuni buoni dettagli per la risoluzione dei problemi: https://groups.google.com/forum/#!topic/phonegap/9NZ4J4l1I-s
In breve, è l'attributo 'accesso' in xml/phonegap.xml. Esso utilizza perl stile regex
To allow all domains (debugging): <access origin=".*"/>
presto, questo potrebbe essere il cambiamento per la seguente sintassi:
<access origin="https://example.com" subdomains="true" />
Whitelist su BlackBerry viene fornito come parte del WebWorks quadro ed è configurato via config.xml:
https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/access_element_834677_11.html
Il progetto di esempio consente l'accesso a tutti gli URL tramite il carattere jolly "*".