Cordova 5.4.0 404 未找到(来自缓存)白名单 CORS http POST 请求

Cordova 5.4.0 404 not found (from cache) whitelist CORS http POST request

我刚刚用最新的 Cordova 工具更新了我的 Visual studio 2015。 我将 Cordova 更新到 5.4.0 并尝试使用 cordova-android 4.1.1 和 5.0.0

我的错误是当我尝试向我的网络服务 (CORS) 发出 post 请求时:

http://ws.MyService.be/PostBug.axd

这是我的 Android 设备上的响应:

Request URL:http://ws.MyService.be/PostBug.axd
Request Method:POST
Status Code:404 Not Found (from cache)
Response Headers
Client-Via:shouldInterceptRequest
Request Headers
Provisional headers are shown
Accept:application/json, text/plain, */*
Cache-Control:no-store, no-cache, must-revalidate
Content-Type:application/json
Origin:file://
User-Agent:Mozilla/5.0 (Linux; Android 5.0; SM-G900F Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Mobile Safari/537.36

在config.xml中:

<access origin="*" />
<allow-navigation href="http://*.infotec.be/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

在index.html中:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' http://ws.MyService.be http://www.infotec.be https://push.ionic.io data: gap: maps.googleapis.com maps.gstatic.com https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *;script-src 'self' 'unsafe-eval' 'unsafe-inline';">

cordova-plugin-whitelist安装的是版本1.0.0

我不知道如何解决这个问题。 我只是想做一个

cordova platform update android@4.X.X

但即使使用 android 4.1.1 我也会收到此错误 代码和服务没有改变,只有 cordova 的版本和所有改变。并且 Visual studio 更新了

编辑:

我可以通过 postman 访问该服务。

我刚刚更新到 cordova-plugin-whitelist 1.1.1-dev。

重建我的应用程序后,我现在 net::ERR_CACHE_MISS 所有 http 请求都处于(失败)状态...没有 HTTP 响应(body 或 header)

Cordova 5.4 有许多问题,并且与 visual studio 和 Windows 不兼容。我建议回滚到 5.3,直到 Cordova 社区发布适用于 Windows 场景的版本。

我们通常会在发布更新时修改我们在 visual studio 中定位的默认 Cordova 版本,但由于这些问题,我们将跳过 5.4。

(披露:我在 Microsoft visual studio 从事 Apache Cordova 工具的工作)