Hey! I’ve been in the same boat before. You can totally use `http-proxy-middleware` for this. Just set up a custom `pathRewrite` function to dynamically change the request path.
Here’s a quick snippet:
```javascript
const { createProxyMiddleware } = require('http-proxy-middleware');
app.use('/api', createProxyMiddleware({
target: 'http://your-target-server.com',
pathRewrite: (path, req) => {
return path.replace('/api/v1', '/v2');
}
}));
```
This should help you with the node express proxy change request path issue. Let me know if you need more details!
Here’s a quick snippet:
```javascript
const { createProxyMiddleware } = require('http-proxy-middleware');
app.use('/api', createProxyMiddleware({
target: 'http://your-target-server.com',
pathRewrite: (path, req) => {
return path.replace('/api/v1', '/v2');
}
}));
```
This should help you with the node express proxy change request path issue. Let me know if you need more details!
