fix(deploy): load vite preview config for md.tkmind.cn host

LaunchAgent web startup must use vite-preview.config.mjs so preview
allowedHosts includes md.tkmind.cn instead of blocking nginx requests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-22 08:55:07 +08:00
parent f6bb02254e
commit f9f8b541dc
2 changed files with 17 additions and 2 deletions
+10 -1
View File
@@ -12,7 +12,16 @@ export default defineConfig(({ mode }) => {
host: env.ADM_WEB_HOST ?? env.ADM_API_HOST ?? '127.0.0.1',
port: Number(env.ADM_PORT ?? 5174),
strictPort: true,
allowedHosts: ['md.tkmind.cn', 'gadm.tkmind.cn', 'localhost', '127.0.0.1', '10.10.0.2', '58.38.22.103'],
// Behind nginx/Caddy on md.tkmind.cn; allow production hostnames explicitly.
allowedHosts: [
'md.tkmind.cn',
'gadm.tkmind.cn',
'localhost',
'127.0.0.1',
'10.10.0.2',
'58.38.22.103',
'.tkmind.cn',
],
proxy: {
'/api': backend,
'/auth': backend,