Alternatively, if you control the server you should set up a CORS policy (http://www.html5rocks.com/en/tutorials/cors/). Lucas.
On Dec 5, 2012, at 12:31 AM, JOSE MANUEL CANTERA FONSECA wrote: > Hi, > > For trusted apps you can use System XHR mechanism. For an example on how > to do that please check > > https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contact > s/js/fb/fb_query.js#L36 > > Thanks, best > > > El 05/12/12 01:37, "[email protected]" > <[email protected]> escribió: > >> Hi all, >> >> Im implementing a webapp for FirefoxOS and now im trying to test it in >> r2d2b2g but im having some troubles: >> >> My app ask for Ajax jsonp request to a external server to get data, i.e: >> >> $.ajax({ >> dataType: "jsonp", >> url: "http://externalurl.com" >> ... >> }); >> >> I tried to allow them through the manifest file, using: >> >> "csp":"default-src *;script-src externalurl.com; options eval-script >> inline-script;" >> >> and lot of combinations of csp configuration but no one works, it seems >> like a problem between the schemes app and http. >> >> Which is the best way to allow this kind of request in a FireFox OS App? >> >> Thank you very much. >> >> Pedro >> _______________________________________________ >> dev-b2g mailing list >> [email protected] >> https://lists.mozilla.org/listinfo/dev-b2g >> > > > > ________________________________ > > Este mensaje se dirige exclusivamente a su destinatario. Puede consultar > nuestra política de envío y recepción de correo electrónico en el enlace > situado más abajo. > This message is intended exclusively for its addressee. We only send and > receive email on the basis of the terms set out at: > http://www.tid.es/ES/PAGINAS/disclaimer.aspx > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
