feat(admin): proxy /v1 API calls through the local admin dev server

The API has no CORS handling, so local admin development serves API calls
same-origin and forwards them to the local API process.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jjbruntonandClaude Fable 5 committed 2026-08-30 20:12:23 +01:00
1 parent af4e1d0cf6
commit d298a33656
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -25,6 +25,14 @@ export default defineConfig({
host: true,
port: 3001,
allowedHosts: ['manage.sauci.app'],
// The API has no CORS handling, so local development serves API calls
// same-origin and forwards them to the local API process.
proxy: {
'/v1': {
target: process.env.SAUCI_ADMIN_API_PROXY ?? 'http://127.0.0.1:3003',
changeOrigin: true,
},
},
watch: {
usePolling: true,
interval: 100,