Refactor: enhance API response schemas for pagination; update environment variables for Supabase and Vision API; improve Vite configuration for proxy routing

This commit is contained in:
salirezav
2025-08-12 13:48:17 -04:00
parent 7a939920fa
commit 62dd0d162b
9 changed files with 57 additions and 35 deletions

View File

@@ -9,9 +9,16 @@ export default defineConfig({
tailwindcss(),
],
server: {
// Allow connecting via this VM's hostname
allowedHosts: ['exp-dash'],
// host is provided via CLI in docker-compose, but keeping this commented for local use:
// host: true,
// Allow connections from the VM hostname and any other host/IP
allowedHosts: ['exp-dash', 'localhost'],
// Proxy API calls from the browser to the API container via the compose service name
proxy: {
'/api': {
// Route to API via the host so this works whether API is on bridge (via port mapping) or host network
target: 'http://host.docker.internal:8000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
})