22 lines
653 B
JavaScript
22 lines
653 B
JavaScript
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
|
|
allowedHosts: ['imeeting.unisspace.com'], // Add the problematic hostname here
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000', // 后端服务地址
|
|
changeOrigin: true, // 是否改变请求的源头
|
|
},
|
|
'/uploads': {
|
|
target: 'http://localhost:8000', // 后端服务地址
|
|
changeOrigin: true, // 是否改变请求的源头
|
|
},
|
|
},
|
|
}
|
|
})
|