gpt4 book ai didi

javascript - Ember fastboot 适用于 http api 主机,但不适用于 https

转载 作者:数据小太阳 更新时间:2023-10-29 05:28:40 24 4
gpt4 key购买 nike

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)

有什么想法吗?这让我非常困惑。

最佳答案

您的问题似乎与您的 SSL 配置有关,更具体地说,您使用的证书未被 CA 正确验证。

为确保是这种情况,您可以尝试将 NODE_TLS_REJECT_UNAUTHORIZED 环境变量设置为 0。这只是临时的,用于调试目的,您不应该在生产中使用它!

如果问题解决了,我建议您检查您的证书有效性。您现在甚至可以使用 LetsEncrypt 免费创建一个你不会遇到任何 CA 问题。

关于javascript - Ember fastboot 适用于 http api 主机,但不适用于 https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43697887/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com