我有这个错误:Mixed Content: The page at 'https://myWebsite' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://myApi'. This request has been blocked; the content must be served over HTTPS.
我的API只是使用HTTP,不能不将其更改为HTTPS,有人帮我解决这个问题
在网站的<head>
标签中添加以下内容:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">