Codex Assistant
2 天以前 58d9f460b2f8c34430285115e2557d18333c5cab
web/vite.config.ts
@@ -10,13 +10,14 @@
    }
  },
  server: {
    port: 5173,
    port: 3000,
    open: true,
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '/api')
        // 不需要重写路径,因为后端的context-path就是/api
        // rewrite: (path) => path.replace(/^\/api/, '/api')
      }
    }
  },