vue跨域解决方案之proxy设置

 

vue跨域代理设置:

vue.config.js 中设置如下:

devServer: {
    // development server port 8000
    port: 8000,
    // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
    proxy: {
      '/recruit-bytx': {
        target: 'http://192.168.50.20',
        ws: false,
        changeOrigin: true
      }
    }
  },

 

试过之后没有解决的,请来砍我!!!!!哈哈哈!!!!

posted @ 2022-04-02 14:13  累小兴  阅读(223)  评论(0编辑  收藏  举报