PhoneGap的构建阿贾克斯请求后返回404 [英] Phonegap Build .ajax request returning 404
问题描述
我正在其上使用Adobe的PhoneGap构建服务建立了PhoneGap的应用程序。
目前,它使用的PhoneGap 3.7.0。
通过jQuery阿贾克斯方法的所有请求都返回404。当我通过它成功地完成网络浏览器提交相同的要求。
我见过的职位(<一个href=\"http://stackoverflow.com/questions/30048453/phonegap-cordova-ajax-requests-404-not-found-error?lq=1\">Phonegap科尔多瓦Ajax请求404(未找到)错误)约5科尔多瓦需要使用科尔多瓦 - 插件白名单插件。
不过,我是新来的PhoneGap,所以我有以下问题:
- 如何在PhoneGap的版本涉及到科尔多瓦的版本?
- 这是受使用的PhoneGap构建?
- 科尔多瓦-插件白名单似乎没有可用的PhoneGap的建立网站。有没有使用插件的另一种方式,如果在PhoneGap的网站建设不能访问它?
我通过在config.xml改变访问令牌固定的:
从
&LT;获得原产=HTTP://www.example.com*/&GT;
...到...
&LT;获得原产=*/&GT;
I'm working on a Phonegap app which is built using the Adobe Phonegap Build service.
It currently uses Phonegap 3.7.0.
All requests made via jQuery .ajax method are returning a 404. When I submit the same request via a web browser it completes successfully.
I've seen the post (Phonegap Cordova Ajax requests 404 (Not Found) Error) about Cordova 5 requiring the use of the cordova-plugin-whitelist plugin.
However I'm new to Phonegap so I have the following questions:
- How does the Phonegap version relate to the Cordova version?
- Is this affected by using Phonegap Build?
- The cordova-plugin-whitelist does not seem to be available on the Phonegap Build website. Is there an alternative way to use a plugin if it is not available on the Phonegap Build website?
I fixed this by changing the access token in the config.xml:
From
<access origin="http://www.example.com*" />
...to...
<access origin="*"/>
这篇关于PhoneGap的构建阿贾克斯请求后返回404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!