Phonegap Cordova Ajax requests 404 (Not Found) Error

后端 未结 5 2094
悲哀的现实
悲哀的现实 2020-12-02 14:11

My cordova version is 5.0.0

I am getting a 404 error for the all ajax request made when the app is deployed on the device. On the web browser, it wo

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 14:33

    It should actually add the cordova whitelist plugin :

    cordova plugin add cordova-plugin-whitelist
    

    or in your config.xml file :

    
    

    but if you are using the online phonegap build service the syntax is different. You have to add the following line in your config.xml file :

    
    

    and authorize cross domain requests :

    
    
    
    

    This is not recommended because a wildcard is used everywhere and everything is permitted. But it is perfect for your tests.

提交回复
热议问题