Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Move the proxy configure to the correct place under server

天舟5d17b2cebf48
diff --git a/frontend/vite.config.js b/frontend/vite.config.js
index cf01b4ee31..3f7bd06c54 100644
--- a/frontend/vite.config.js
+++ b/frontend/vite.config.js
@@ -6,15 +6,14 @@ module.exports = {
optimizeDeps: {
allowNodeBuiltins: ["postcss", "bytebase"],
},
- proxy: {
- // // string shorthand
- // '/foo': 'http://localhost:4567/foo',
- // // with options
- // '/api': {
- // target: 'http://jsonplaceholder.typicode.com',
- // changeOrigin: true,
- // rewrite: path => path.replace(/^\/api/, '')
- // }
+ server: {
+ proxy: {
+ "/api": {
+ target: "http://localhost:8080/api",
+ changeOrigin: true,
+ rewrite: (path) => path.replace(/^\/api/, ""),
+ },
+ },
},
resolve: {
// alias: {