add domain manager

This commit is contained in:
2025-03-25 19:19:09 +08:00
parent 45443709af
commit d649666379
9 changed files with 319 additions and 16 deletions

View File

@@ -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'),
},