Skip to content

Commit a551d01

Browse files
committed
fix: use relative API path for import SSE to work with Vite proxy
1 parent 8eaef27 commit a551d01

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

client/src/hooks/use-import-stream.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ type ImportState =
2323
| { status: 'done'; result: ImportResult }
2424
| { status: 'error'; error: string };
2525

26-
const API_BASE = import.meta.env.DEV ? 'http://localhost:3721' : '';
26+
// In dev mode, use relative path so the request goes through Vite's proxy
27+
const API_BASE = '';
2728

2829
export function useImportStream() {
2930
const [state, setState] = useState<ImportState>({ status: 'idle' });

0 commit comments

Comments
 (0)