import DS from 'ember-data';
export default DS.JSONAPIAdapter.extend({
host: 'http://api.theapothecaryshoppe.com',
// host: 'https://api.theapothecaryshoppe.com'
});普通主机正常工作,但当我使用https时,会得到以下错误:
Error: The adapter operation was aborted
at EmberError.AdapterError (/home/nick/the-apothecary-shoppe/portal-ember/tmp/broccoli_merge_trees-output_path-j1H7NK9S.tmp/fastboot/vendor.js:85927:16)
at EmberError.ErrorClass (/home/nick/the-apothecary-shoppe/portal-ember/tmp/broccoli_merge_trees-output_path-j1H7NK9S.tmp/fastboot/vendor.js:85952:24)
at ajaxError (/home/nick/the-apothecary-shoppe/portal-ember/tmp/broccoli_merge_trees-output_path-j1H7NK9S.tmp/fastboot/vendor.js:87597:15)
at Object.hash.error (/home/nick/the-apothecary-shoppe/portal-ember/tmp/broccoli_merge_trees-output_path-j1H7NK9S.tmp/fastboot/vendor.js:87269:23)
at fire (/home/nick/the-apothecary-shoppe/portal-ember/node_modules/jquery-deferred/lib/jquery-callbacks.js:78:30)
at Object.fireWith (/home/nick/the-apothecary-shoppe/portal-ember/node_modules/jquery-deferred/lib/jquery-callbacks.js:188:7)
at Object.fire [as reject] (/home/nick/the-apothecary-shoppe/portal-ember/node_modules/jquery-deferred/lib/jquery-callbacks.js:195:10)
at ClientRequest.onError (/home/nick/the-apothecary-shoppe/portal-ember/node_modules/najax/lib/najax.js:208:9)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)有什么想法吗?这真的让我迷惑不解。
发布于 2017-05-03 06:21:29
您的问题似乎与您的SSL配置有关,更具体地说,您使用的证书没有被CA正确地验证。
为了确保是这样的,您可以尝试将NODE_TLS_REJECT_UNAUTHORIZED环境变量设置为0。这只是暂时的,出于调试的目的,您不应该在生产中使用它!
如果解决了这个问题,我建议检查一下您的证书有效性。现在,您甚至可以使用LetsEncrypt免费创建一个,您将不会遇到任何CA问题。
https://stackoverflow.com/questions/43697887
复制相似问题