【问题标题】:Error occurred while trying to proxy request SELF_SIGNED_CERT_IN_CHAIN https api angular CLI尝试代理请求 SELF_SIGNED_CERT_IN_CHAIN https api angular CLI 时发生错误
【发布时间】:2018-09-08 05:35:48
【问题描述】:

在 IBM WAS 中,我们可以选择将证书添加到信任库,以消除此类证书问题。我们应该用 npm 做什么?

【问题讨论】:

    标签: angular https proxy certificate signed


    【解决方案1】:

    CLI 只是用于开发的本地代理。您可以添加"secure": false 以防止错误。

    例子:

    {
      "/api": {
        "target": "https://localhost:3000",
        "secure": false
      }
    }
    

    【讨论】:

    • 感谢 Robin,我们的 api 在我们现有的 spring API 中运行在 IBM was server 中,它设置为仅在 https 中运行。 http 调用就像一个魅力,没有任何问题。让它与 https 一起工作是这里的问题。
    • AFAIK 据我所知 https 不会有问题。安全错误标志接受自签名证书。
    猜你喜欢
    • 2020-07-10
    • 2017-08-07
    • 1970-01-01
    • 2022-01-03
    • 2021-05-22
    • 2015-08-02
    • 2022-06-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多