build(vite):调整反代配置。
This commit is contained in:
parent
46396e7d6f
commit
19e0c1fa7c
|
@ -5,13 +5,12 @@ import { defineConfig } from "vite";
|
|||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: `http://127.0.0.1:3000`,
|
||||
target: `http://127.0.0.1:8080`,
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
rewrite: (path) => path.replace(/^\/api/, proxyHost.Path),
|
||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user