jiangping
2023-08-23 22da2b10a27dbda564786cb690e3060d0dee3307
screen_standard/vite.config.js
@@ -50,15 +50,16 @@
          target: env.VITE_BASE_URL, // 通过代理接口访问实际地址。这里是实际访问的地址。vue会通过代理服务器来代理请求
          changeOrigin: true,
          ws: false,  // 允许websocket代理
          // rewrite: (path) => path.replace(/^\[env.VITE_BASE_PATH]/, ''), // 将api替换为空
          secure: false
          // rewrite: (path) => path.replace(/^[env.VITE_BASE_PATH]/, ''), // 将api替换为空
          secure: false,
          rewrite: (path) => path.replace(/^\/api/, '')
        },
        '/api' : {
        /*'/api' : {
          target: env.VITE_BASE_URL, // 通过代理接口访问实际地址。这里是实际访问的地址。vue会通过代理服务器来代理请求
          changeOrigin: true,
          ws: false,  // 允许websocket代理
          rewrite: (path) => path.replace(/^\api/, ''), // 将api替换为空
        }
        }*/
      }
    }
  }