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.
This commit is contained in:
parent
2d35f2d498
commit
a4f9df6906
|
|
@ -2,7 +2,7 @@ import type { ChatMode } from '@/types/chat'
|
||||||
|
|
||||||
// In production, use relative URL to route through the proxy server
|
// In production, use relative URL to route through the proxy server
|
||||||
// For local development, set VITE_API_URL=http://localhost:8000 in .env
|
// 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 API_ENDPOINT = import.meta.env.VITE_API_ENDPOINT || '/chat/stream'
|
||||||
const USE_MOCK_DATA = false // Set to true to use mock data for testing
|
const USE_MOCK_DATA = false // Set to true to use mock data for testing
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue