change endpoint for proxy
parent
1bcb15f655
commit
911bfb88d1
|
|
@ -1,6 +1,6 @@
|
|||
class MetricsService {
|
||||
constructor() {
|
||||
this.baseUrl = 'ws://localhost:3001/api/metrics-ws';
|
||||
this.baseUrl = '/metrics-ws';
|
||||
this.socket = null;
|
||||
this.subscriptions = new Map();
|
||||
this.pendingRequests = new Map();
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/ai-api/, ''),
|
||||
},
|
||||
'/metrics-ws': {
|
||||
target: 'ws://localhost:3001',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://localhost:3000',
|
||||
ws: true,
|
||||
|
|
@ -20,7 +25,6 @@ export default defineConfig({
|
|||
bypass(req, res, options) {
|
||||
console.log('Proxying request:', req.url);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue