mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-06-04 19:02:11 +00:00
🔧 chore: Configure Vite server with proxy settings
- Add `server` configuration in `vite.config.ts` - Enable `host: 0.0.0.0` for external access - Setup proxy for `/api`, `/mj`, and `/pg` endpoints targeting `http://localhost:3000`
This commit is contained in:
@@ -19,4 +19,21 @@ export default defineConfig({
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:3000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/mj': {
|
||||
target: 'http://localhost:3000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/pg': {
|
||||
target: 'http://localhost:3000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user