was loaded over HTTPS, but requested an insecure错误解决

1、问题:今天客服老师在群里反馈一个加密上传图片的组件上传图片失败,问我是不是对图片格式进行了限制。我在控制台打开一下,爆出了这样的一个错误

The page at 'https://oms.luojilab.com/oms-host#/ledgers/user' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://ddimage.luojilab.com/ddimage/upload/private/create_token'. This request has been blocked; the content must be served over HTTPS.

意思是:页面位于'https://oms.luojilab.com/oms-host#/ledgers/user'通过HTTPS加载,但请求了不安全的XMLHttpRequest端点'http://ddimage.luojilab.com/ddimage/upload/private/create_token'. 此请求已被阻止;内容必须通过HTTPS提供。

猜你喜欢

转载自blog.csdn.net/lovecoding1/article/details/129087794