我在我的服务器 (HTTPS) 中运行了 NGINX,我也在服务器中运行了一个 API(通过 PM2)。此 API 响应是 HTTP,我想在 HTTPS 网页中显示响应。
我无法在 HTTPS 中运行 PM2 API。我想要的是让 HTTPS 提供 HTTP 内容。
Mixed Content: The page at 'https://example_web.com' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://example_api.com'. This request has been blocked; the content must be served over HTTPS.
最佳答案
- 我们无法从 HTTPS 来源获取 HTTP 资源。
- 出于安全原因,大多数浏览器都会阻止它。
- 我们可以通过您的服务器代理网络服务的应答。
关于http - 如何在HTTPS网页中显示HTTP内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56003932/