update
This commit is contained in:
@@ -7,28 +7,13 @@ const centerEnv = process.env.CENTER_ENV;
|
||||
const plugins: any[] = [];
|
||||
plugins.push(tailwindcss());
|
||||
const meBackend = 'https://kevisual.xiongxiao.me';
|
||||
const backend = meBackend;
|
||||
let proxy = {};
|
||||
if (true) {
|
||||
proxy = {
|
||||
'/api': {
|
||||
target: backend,
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
cookieDomainRewrite: 'localhost',
|
||||
rewrite: (path: any) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/user/login': {
|
||||
target: backend,
|
||||
changeOrigin: true,
|
||||
cookieDomainRewrite: 'localhost',
|
||||
rewrite: (path: any) => path.replace(/^\/user/, '/user'),
|
||||
},
|
||||
'/test': {
|
||||
target: backend,
|
||||
},
|
||||
};
|
||||
}
|
||||
let target = meBackend || 'http://localhost:51515';
|
||||
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
|
||||
let proxy = {
|
||||
'/root/': apiProxy,
|
||||
'/api': apiProxy,
|
||||
'/client': apiProxy,
|
||||
};
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
|
||||
Reference in New Issue
Block a user