feat: add Node.js Express server for IAP and backend auth
Replace Python http.server with Express to handle: - Large IAP JWT headers that caused 500 errors - API request proxying with GCP identity tokens - Static React build serving with SPA fallback Update api.ts to use relative URLs in production for proxy routing.
This commit is contained in:
+3
-1
@@ -1,6 +1,8 @@
|
||||
import type { ChatMode } from '@/types/chat'
|
||||
|
||||
const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000'
|
||||
// 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_ENDPOINT = import.meta.env.VITE_API_ENDPOINT || '/chat/stream'
|
||||
const USE_MOCK_DATA = false // Set to true to use mock data for testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user