Django + Vue + Axios 报错解决 No ‘Access-Control-Allow-Origin‘ header is present on the requested resour
前言:自己在玩 Django + Vue 前后端分离,前端用 Axios.js 调用后端 API 结果浏览器报错:一、报错:No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access二、分析:在请求服务器的 header 里没有标注:“Access-Control-Allow-Origin”,所以拒绝显示数据
原创
2021-10-10 05:04:58 ·
1377 阅读 ·
0 评论