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