FRP reverse-proxy access to :3100 was blocked by Vite host checks. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
577 B
TypeScript
28 lines
577 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
// @ts-expect-error vitest config field
|
|
test: {
|
|
include: ['src/components/chat/**/*.test.ts'],
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3100,
|
|
// FRP / reverse-proxy Host headers (e.g. frp-mix.com → :3100)
|
|
allowedHosts: ['.frp-mix.com'],
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
});
|
|
|