From a4f9df69061cc7fb7f464fe101d87ec36534ae0e Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 20 Jan 2026 12:18:53 -0600 Subject: [PATCH] fix: enforce proxy routing by removing VITE_API_URL fallback Remove the environment variable fallback for API_BASE_URL to ensure all API requests are routed through the proxy server. This provides consistent authentication and security handling in all environments. --- src/lib/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/api.ts b/src/lib/api.ts index 804b3f1..ca20210 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -2,7 +2,7 @@ import type { ChatMode } from '@/types/chat' // In production, use relative URL to route through the proxy server // For local development, set VITE_API_URL=http://localhost:8000 in .env -const API_BASE_URL = import.meta.env.VITE_API_URL || '/api' +const API_BASE_URL = '/api' const API_ENDPOINT = import.meta.env.VITE_API_ENDPOINT || '/chat/stream' const USE_MOCK_DATA = false // Set to true to use mock data for testing