imetting_frontend/vite.config.js

23 lines
707 B
JavaScript
Raw Normal View History

2025-08-05 01:44:28 +00:00
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: true, // Optional: Allows the server to be accessible externally
port: 5173, // Optional: Specify a port if needed
2025-08-28 08:02:34 +00:00
allowedHosts: ['imeeting.unisspace.com'], // Add the problematic hostname here
proxy: {
'/api': {
target: 'http://localhost:8000', // 后端服务地址
changeOrigin: true, // 是否改变请求的源头
},
'/uploads': {
target: 'http://localhost:8000', // 后端服务地址
changeOrigin: true, // 是否改变请求的源头
},
},
}
2025-08-05 01:44:28 +00:00
})