Skip to content

Commit 4f183a1

Browse files
fix: update server.js for Express 5 and http-proxy-middleware v3 compatibility
1 parent 338442f commit 4f183a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/frontend-server/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ app.use('/api', createProxyMiddleware({
2222
target: BACKEND_URL,
2323
changeOrigin: true,
2424
pathRewrite: {
25-
'^/api': '/api'
25+
'^/': '/api/'
2626
},
2727
agent: httpAgent,
2828
// Increase timeout for long-running requests (10 minutes)
@@ -56,7 +56,7 @@ app.use('/api', createProxyMiddleware({
5656
app.use(express.static(path.join(__dirname, 'static')));
5757

5858
// Serve index.html for all other routes (SPA support)
59-
app.get('*', (req, res) => {
59+
app.get('{*path}', (req, res) => {
6060
res.sendFile(path.join(__dirname, 'static', 'index.html'));
6161
});
6262

0 commit comments

Comments
 (0)