nuxt $axios访问多个服务器地址请求数据
时间:2020-07-13 19:22:42
收藏:0
阅读:259
axios: { proxy: true, retry: { retries: 0 }, }, proxy: { // 上线关闭 ‘/ic‘: { target: ‘https://www.baidu.cn/‘, secure: false, // 如果是https接口,需要配置这个参数 changeOrigin: true, pathRewrite: { ‘^/ic‘: ‘/ic‘ } }, ‘/v1‘: { target: ‘http://www.youku.com‘, secure: false, // 如果是https接口,需要配置这个参数 changeOrigin: true, pathRewrite: { ‘^/v1‘: ‘/v1‘ } } },
原文:https://www.cnblogs.com/qq364735538/p/13295054.html
评论(0)