fix: exempt dashboard-critical endpoints from rate limiter
License status, services list, config, and license feature checks were being rate-limited (429) after ~14 minutes of dashboard polling, causing the license to show FREE TIER and services to fail loading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -386,7 +386,7 @@ module.exports = function configureMiddleware(app, {
|
|||||||
...RATE_LIMITS.GENERAL,
|
...RATE_LIMITS.GENERAL,
|
||||||
standardHeaders: true,
|
standardHeaders: true,
|
||||||
legacyHeaders: false,
|
legacyHeaders: false,
|
||||||
skip: (req) => isTest || req.path === '/health' || req.path === '/api/health' || req.path.startsWith('/probe/') || req.path.startsWith('/api/auth/gate/') || req.path === '/api/totp/check-session' || req.path.endsWith('/health-checks/status') || req.path.endsWith('/csrf-token') || req.path === '/api/v1/dns/logs',
|
skip: (req) => isTest || req.path === '/health' || req.path === '/api/health' || req.path.startsWith('/probe/') || req.path.startsWith('/api/auth/gate/') || req.path === '/api/totp/check-session' || req.path.endsWith('/health-checks/status') || req.path.endsWith('/csrf-token') || req.path === '/api/v1/dns/logs' || req.path === '/api/license/status' || req.path.startsWith('/api/license/feature/') || req.path === '/api/services' || req.path === '/api/config',
|
||||||
message: { success: false, error: 'Too many requests, please try again later' }
|
message: { success: false, error: 'Too many requests, please try again later' }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user