165537 created CB-7425:
--------------------------

             Summary: AJAX blocked when using cdvfile
                 Key: CB-7425
                 URL: https://issues.apache.org/jira/browse/CB-7425
             Project: Apache Cordova
          Issue Type: Bug
    Affects Versions: 3.4.0
         Environment: Android 4.2.2, Phonegap 3.4 (CORDOVA_JS_BUILD_LABEL = 
'3.4.0')
            Reporter: 165537


Doing AJAX from packaged files (eg location 
"file:///android_asset/www/index.html") works well, but doing it from local 
files (eg "cdvfile://localhost/persistent/TEST/index.html") does not.

I guess it has to do with the same-origin policy. Is there anything that can be 
done to make it work?

If I were reading files from the internet, I would set the web server to add 
some "Access-Control-Allow-Origin" headers, but here there's no web server. 
Using jsonp would work, but it'd mean changing the code in the server and in 
the app.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to