axios配置允许跨域
作者:
爱代码的派派星 | 来源:发表于
2019-09-27 11:52 被阅读0次import axios from 'axios';
axios.defaults.withCredentials=true
axios.defaults.crossDomain=true
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
// 正式环境接口转向
// axios.defaults.baseURL = '//aaa.eos.dev.enbrands.com';
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.headers.get['Content-Type'] = 'application/x-www-form-urlencoded';
本文标题:axios配置允许跨域
本文链接:https://www.haomeiwen.com/subject/zzgouctx.html
网友评论