【问题标题】:How to have Meteor Cordova app allow access to a domain如何让 Meteor Cordova 应用程序允许访问域
【发布时间】:2015-05-23 06:55:44
【问题描述】:

我刚刚做了一个流星更新,现在有版本: 流星 1.0.4 科尔多瓦 4.2.0

我最近还使用 mup deploy 将我的服务器移动到数字海洋。

我现在发现,虽然桌面和移动网站运行良好,但在 Android 移动应用中,图像不再加载。这些图片是公共 URL。

我在这里读到: https://www.meteor.com/blog/2015/03/17/meteor-104-mongo-cordova-template-subscriptions

默认情况下,Meteor Cordova 应用程序不再允许访问所有域。我们需要使用 mobile-config.js 中的 App.accessRule 方法将允许的域列入白名单。

所以我尝试像这样设置 mobile-config.js:

App.accessRule(
    "http://ecx.images-amazon.com/*",
    {
        launchExternal: true
    }
);

但是来自该域的图像仍然不起作用。

【问题讨论】:

    标签: android cordova meteor


    【解决方案1】:

    想通了。 launchExternal 需要设置为 false 才能由 Meteor 应用程序本身在内部处理(即显示在屏幕上)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-13
      • 2015-04-14
      • 1970-01-01
      • 1970-01-01
      • 2018-12-04
      • 2015-07-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多