Fix jwt-token
This commit is contained in:
@@ -93,6 +93,11 @@ app.use((req, res, next) => ipRestriction.checkIPRestriction(req, res, next));
|
||||
// Tenant-specific API rate limiting (for authenticated endpoints)
|
||||
const { enforceApiRateLimit } = require('./middleware/tenant-limits');
|
||||
app.use('/api', (req, res, next) => {
|
||||
// Skip tenant rate limiting for management and data-retention endpoints
|
||||
if (req.path.startsWith('/management') || req.path.startsWith('/data-retention')) {
|
||||
return next();
|
||||
}
|
||||
|
||||
// Apply tenant rate limiting only to authenticated API endpoints
|
||||
if (req.headers.authorization) {
|
||||
return enforceApiRateLimit()(req, res, next);
|
||||
|
||||
Reference in New Issue
Block a user