현재 작업 상태 저장

This commit is contained in:
Yun Chan 2026-06-27 11:20:24 +09:00
parent 07cc67761e
commit 6bd91b0d5e
674 changed files with 8726 additions and 298 deletions

View file

@ -4,13 +4,25 @@ import react from "@vitejs/plugin-react";
// Vignette web — Vite + React 19.
// 개발 시 /api, /auth 프록시로 FastAPI(8000) 백엔드에 붙는다.
// 쿠키 인증(__Host-vignette_sid)을 위해 changeOrigin + 쿠키 전달.
const nodeEnv = (
globalThis as unknown as {
process?: { env?: { VITE_ALLOWED_HOSTS?: string; VITE_API_PROXY_TARGET?: string } };
}
).process?.env;
const allowedHosts = (nodeEnv?.VITE_ALLOWED_HOSTS ?? "")
.split(",")
.map((host: string) => host.trim())
.filter(Boolean);
const apiProxyTarget = nodeEnv?.VITE_API_PROXY_TARGET?.trim() || "http://127.0.0.1:8000";
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
...(allowedHosts.length ? { allowedHosts } : {}),
proxy: {
"/api": {
target: "http://127.0.0.1:8000",
target: apiProxyTarget,
changeOrigin: true,
ws: true,
// 백엔드 라우트는 /auth, /sessions, /health 로 노출되므로 /api 프리픽스 제거.