伪造或强制本地https:在window.location.protocol中

时间:2015-12-09 10:34:09

标签: javascript cordova meteor

我使用Meteor.js并通过Cordova编译我的应用程序。付款我使用Braintree。

Braintree希望window.location.protocol为“https:”。但是,当我使用cordova编译时,位置为:http://meteor.local/,因此协议“http:”。

有没有办法在本地伪造window.location.protocol为“https:”?

1 个答案:

答案 0 :(得分:0)

You could try adding the force-ssl package which requires apps to use https. Have not tested it with Cordova, though.

https://atmospherejs.com/meteor/force-ssl