文件的 IdentityServer3 和 AllowedCorsOrigins:// origin (cordova)

IdentityServer3 and AllowedCorsOrigins for file:// origin (cordova)

我在 Cordova 应用程序中使用 InAppBrowser 来调用 IdentityServer3 端点。它在模拟器中工作正常,但在设备上失败。

我认为问题是 XHR 调用失败,因为设备 (Android) 在主机 file:// 上 运行,这可能不是 [=11= 的有效域] 属性 在 IdentityServer 客户端上。

我 100% 没有想法,在绝望中发布这个,我可能会遗漏一些东西。

CORS 是一个转移注意力的问题(它不是来自 Cordova 中的 file:// 位置的问题 - 仅在可能阻止它的浏览器中)。

xhr.responseType = "json"; 是问题所在 - Chrome 的旧版本不支持(我猜后来,我的 Android 设备)。