Initial commit

This commit is contained in:
ChuXun
2026-01-28 23:56:33 +08:00
commit f98da73376
92 changed files with 8261 additions and 0 deletions

25
frontend/vite.config.ts Normal file
View File

@@ -0,0 +1,25 @@
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const proxyTarget = env.VITE_PROXY_TARGET || 'http://localhost:8080';
return {
plugins: [react()],
server: {
proxy: {
'/api/v1': {
target: proxyTarget,
changeOrigin: true,
secure: false,
configure: (proxy) => {
proxy.on('proxyReq', (proxyReq) => {
proxyReq.removeHeader('origin');
});
},
},
},
},
};
});