【发布时间】:2021-07-24 05:33:44
【问题描述】:
我已经在 VPS 上安装了一个带有 react front 的 nodejs 服务器。 我购买了commondo SSL,修复了服务器和域,然后如果我调用http,它会显示混合类型错误。 SSL 检查器为 SSL 提供 A 级。我使用 https.create 创建节点服务器。邮递员也为http://example.com/5000/posts 提供了正确的结果。
混合内容:“https://example.com/”页面通过 HTTPS 加载,但请求了不安全的 XMLHttpRequest 端点“http://example.com:5000/posts”。此请求已被阻止;内容必须通过 HTTPS 提供。
我该如何解决这个错误?它的 axios 、 node 或 SSL 问题?
【问题讨论】:
标签: node.js reactjs http https axios