我有一个应用程序,在服务器端函数中使用 Meteor.http.call() 。
var ret = Meteor.http.call("GET", "https://www.quandl.com/api/v1/datasets/SF1/<...>");
这可以使用本地主机 meteor 服务器:我将数据返回到 ret
变量中。
我将应用程序部署到 ruleoneinvesting.meteor.com
,现在使用相同的调用收到此错误:
XMLHttpRequest cannot load https://ddp--4645-ruleoneinvesting.meteor.com/sockjs/info?cb=p7czcbhqun. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ruleoneinvesting.meteor.com' is therefore not allowed access. The response had HTTP status code 503.
This没有帮助。
最佳答案
对不起,是我的错。我当时用的是
fs.writeFile('../../../../../../data/')
在*.meteor.com
中不允许写入的文件夹中。
这导致了 HTTP 状态代码 503
。
关于javascript - 来 self 的 app.meteor.com 的 Meteor.http.call(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33247461/