【发布时间】:2019-10-17 11:25:29
【问题描述】:
【问题讨论】:
-
在应用程序的某个地方你试图点击sportmanagementsystemapi.herokuapp.com/api/user检查所有使用的api端点的出现
-
尝试直接在浏览器中打开sportmanagementsystemapi.herokuapp.com/api/user——即
https://sportmanagementsystemapi.herokuapp.com/api/user/,使用https作为协议。你会发现你被重定向到http://sportmanagementsystemapi.herokuapp.com/api/user/——也就是说,纯http,非https。代码中的 axios.post 请求也会发生同样的事情——它被重定向到那个非 https 的 URL。这就是您收到混合内容错误的原因。 -
@sideshowbarker 你是如何改变它的?在 api 中还是在我的 vue 项目中?
-
sportmanagementsystemapi.herokuapp.com服务器需要更改,使其不会从 https 重定向到 http
标签: api vue.js heroku mixed-content