This commit is contained in:
NotSoToothless
2026-06-28 06:20:20 -07:00
committed by GitHub
parent 377f7b8397
commit ffb31f3bb1
3 changed files with 12 additions and 6 deletions
+6
View File
@@ -88,6 +88,12 @@ function requireAdminBearer(req, res, next) {
app.use('/api', requireApiBearer);
// Rewrite /api/sre/* → /api/* so the gateway can forward channel-prefixed paths.
app.use('/api/sre', (req, res, next) => {
req.url = req.url.replace('/api/sre', '/api');
next();
});
// Readiness gate: heavy aggregation endpoints sit behind this so cold-start
// requests don't pile up on the read connection while the DB is still opening
// indexes and the vehicle-list cache is warming. Resolves when boot work