add domain manager
This commit is contained in:
@@ -27,7 +27,7 @@ const meBackend = 'https://kevisual.cn';
|
||||
const backendWss = devBackend.replace(/^https:/, 'wss:');
|
||||
const backend = meBackend;
|
||||
let proxy = {};
|
||||
if (true) {
|
||||
if (false) {
|
||||
proxy = {
|
||||
'/api': {
|
||||
target: backend,
|
||||
@@ -48,14 +48,6 @@ if (true) {
|
||||
};
|
||||
}
|
||||
|
||||
function processImageName(fileName: string): string {
|
||||
if (fileName.includes('panda')) {
|
||||
return fileName; // 保留原名
|
||||
}
|
||||
// 其他图片文件名处理逻辑
|
||||
return `${fileName}.jpg`; // 示例:添加后缀
|
||||
}
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), ...plugins],
|
||||
@@ -96,7 +88,7 @@ export default defineConfig({
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': {
|
||||
target: 'https://localhost:4005',
|
||||
target: 'http://localhost:4005',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user