在本地 localhost:8080 开发想请求http:192.168.0.60/api/v1接口 webpeck配置如下
devServer: {
historyApiFallback: true,
noInfo: true,
hot: true,
proxy: {
'/list': {
target: 'http://192.168.0.60/api/v1',
changeOrigin: true,
secure: false
}
}
}
vue resource调用
Vue.http.post('/list/login', {
username: 'admin',
password: 'password',
force: true
})
但是一直失败 返回401 接口测试过没有问题 想请问大神这是什么原因
我是这样配置的