Route frontend inventory calls to backend via Vite proxy
CI / basic-check (push) Has been cancelled

This commit is contained in:
Perplexity Bot
2026-08-04 19:55:46 +00:00
parent 3567c17bb1
commit 92b0136015
+26 -1
View File
@@ -7,10 +7,35 @@ export default defineConfig({
host: '0.0.0.0',
port: 5173,
proxy: {
'/api': {
'/inventory': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
'/objects': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
'/jobs': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
'/discoveries': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
'/relations': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
'/health': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
'/api': {
target: 'http://127.0.0.1:8001',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
});