mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
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:
1 parent
af4e1d0cf6
commit
d298a33656
2 files changed
+9
-1
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user