Skip to content

Commit 5f7fcef

Browse files
Dependency updates
Dependency updates
2 parents 610b42d + ddf6cdb commit 5f7fcef

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"author": "",
1616
"license": "MIT",
1717
"dependencies": {
18-
"express": "^4.18.2",
18+
"express": "^5.2.1",
1919
"cors": "^2.8.5",
2020
"axios": "^1.6.2",
2121
"dotenv": "^17.2.3",
2222
"body-parser": "^2.2.2",
23-
"body-parser": "^1.20.2",
23+
"body-parser": "^2.2.2",
2424
"express-rate-limit": "^8.2.1",
25-
"helmet": "^7.1.0",
25+
"helmet": "^8.1.0",
2626
"ws": "^8.16.0",
2727
"node-schedule": "^2.1.1",
2828
"winston": "^3.11.0",
@@ -32,6 +32,6 @@
3232
},
3333
"devDependencies": {
3434
"nodemon": "^3.0.2",
35-
"concurrently": "^8.2.2"
35+
"concurrently": "^9.2.1"
3636
}
3737
}

server/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ app.get('/health', healthLimiter, (req, res) => {
8888
if (process.env.NODE_ENV === 'production') {
8989
app.use(express.static(path.join(__dirname, '../client/build')));
9090

91-
// Wildcard route for React app (rate limited to prevent abuse)
92-
app.get('*', healthLimiter, (req, res) => {
91+
// Catch-all handler for React app (rate limited to prevent abuse)
92+
app.use(healthLimiter, (req, res) => {
93+
// Skip API routes and other specific paths
94+
if (req.path.startsWith('/api/')) {
95+
return res.status(404).json({ error: 'API endpoint not found' });
96+
}
9397
res.sendFile(path.join(__dirname, '../client/build', 'index.html'));
9498
});
9599
}

0 commit comments

Comments
 (0)