proxyConfig.js 336 B

123456789101112
  1. module.exports = {
  2. proxy: {
  3. '/apis': { //将www.exaple.com印射为/apis
  4. target: 'http://localhost:3000', // 接口域名
  5. secure: false, // 如果是https接口,需要配置这个参数
  6. changeOrigin: true, //是否跨域
  7. pathRewrite: {
  8. '^/apis': '' //需要rewrite的,
  9. }
  10. }
  11. }
  12. }