由于网站升级成了https,然后发现无法跨域请求http的接口了(原先是可以的)项目用vue-cli创建的,异步请求用的axios,发送请求到http开头的接口上时报了下面的错误:Mixed Content: The page at 'https://open.test.ai/#/recitationlocation' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.open.test.ai/readingcutupload'. This request has been blocked; the content must be served over HTTPS.网上说可以使用相对资源链接,比如//api.open.test.ai/readingcutupload,但是还是会报错(因为https://api.open.test.ai/readingcutupload这个接口是不存在的,接口并没有升级到https)想请教下各位一定要把请求的所有接口都升级到https才可以吗?有没有不升级的办法?
添加回答
举报
0/150
提交
取消